Help needed in getting values from the dynamically created text boxes

Hello,
I am developing one jsp page using struts. In the page i m
dynamically adding some rows with two text boxes in each row. and after entering data into
those textboxes , user clicks on save button and page is submitted.
I want to capture all this data of dynamically added
rows so that i can enter those rows into DB.
how can i acheive this using struts?.
Have anyone had tried doing it?. Please help.
Thanx in advance
Deepali Naik

Hi,
1. If you give these textBoxes the same name, then in your action you can call request.getParameterValues(paramName) - it returns String[ ] of values.
2. You can give form textBox names like "name"+index or something like this in <logic:iterate> tag
Good luck!

Similar Messages

  • Getting values from the dynamically created textboxes

    Hello,
    I am developing one jsp page using struts. In the page i m
    dynamically adding some rows with 2 textboxes in each row. and
    after entering data into those rows , user clicks on save button
    and page is submitted. I want to capture all this data of dynamically
    added rows so that i can enter those rows into DB.
    how can i acheive this using struts?.
    Have anyone had tried doing it?. Please help.
    Thanx in advance
    Deepali Naik

    U can do something like......
    class MatrixData{
    public myMethod(){
    Arraylist list_of_rows=new Arraylist ();
    JTextBox 11=new JTextBox (); // matrix position (1,1)
    JTextBox 12=new JTextBox ();// matrix position (1,2)
    addRow(new RowData(11,12)
    public addRow(RowData data){
    list_of_rows.add(data);
    class RowData{
    Arraylist txtBoxList=new Arraylist ();
    public JTextBox getOne(){
    return txtBoxList.get(0);
    public JTextBox getTwo(){
    return txtBoxList.get(1);
    public setOne(JTextBox comp){
    txtBoxList.add(comp);
    public setTwo(JTextBox comp){
    txtBoxList.add(comp);
    Hope it helps.
    Best Regards
    Mohit

  • Failed to get schema from the dynamic feed (example.php).

    Hi,
    I've been trying to get the schema from an exported xml file
    ex. example.php
    (using Developer Toolbox).
    But it keeps saying "
    Failed to get schema from the dynamic feed (example.php)."
    Any help?
    Thanks
    Wald

    Here's the file:
    data.php, I can see it
    correctly in the browser except of the style information that are
    missing.
    Code:
    <?php require_once('../Connections/example.php'); ?>
    <?php
    // Load the XML classes
    require_once('../includes/XMLExport/XMLExport.php');
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType,
    $theDefinedValue = "", $theNotDefinedValue = "")
    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue)
    : $theValue;
    $theValue = function_exists("mysql_real_escape_string") ?
    mysql_real_escape_string($theValue) :
    mysql_escape_string($theValue);
    switch ($theType) {
    case "text":
    $theValue = ($theValue != "") ? "'" . $theValue . "'" :
    "NULL";
    break;
    case "long":
    case "int":
    $theValue = ($theValue != "") ? intval($theValue) : "NULL";
    break;
    case "double":
    $theValue = ($theValue != "") ? "'" . doubleval($theValue) .
    "'" : "NULL";
    break;
    case "date":
    $theValue = ($theValue != "") ? "'" . $theValue . "'" :
    "NULL";
    break;
    case "defined":
    $theValue = ($theValue != "") ? $theDefinedValue :
    $theNotDefinedValue;
    break;
    return $theValue;
    mysql_select_db($database_example, $example);
    $query_data = "SELECT * FROM example";
    $data = mysql_query($query_data, $example) or
    die(mysql_error());
    $row_data = mysql_fetch_assoc($data);
    $totalRows_data = mysql_num_rows($data);
    // Begin XMLExport data
    $xmlExportObj = new XMLExport();
    $xmlExportObj->setRecordset($data);
    $xmlExportObj->addColumn("Name", "Name");
    $xmlExportObj->addColumn("Damage", "Damage");
    $xmlExportObj->addColumn("Speed", "Speed");
    $xmlExportObj->addColumn("Level", "Level");
    $xmlExportObj->addColumn("Details", "Details");
    $xmlExportObj->addColumn("Type", "Type");
    $xmlExportObj->addColumn("Source", "Source");
    $xmlExportObj->addColumn("Location", "Location");
    $xmlExportObj->addColumn("Date", "Date");
    $xmlExportObj->addColumn("Price", "Price");
    $xmlExportObj->addColumn("Skill", "Skill");
    $xmlExportObj->addColumn("Constitution", "Constitution");
    $xmlExportObj->addColumn("Intelligence", "Intelligence");
    $xmlExportObj->addColumn("Wisdom", "Wisdom");
    $xmlExportObj->addColumn("Strength", "Strength");
    $xmlExportObj->addColumn("Member", "Member");
    $xmlExportObj->addColumn("Image", "Image");
    $xmlExportObj->setMaxRecords("ALL");
    $xmlExportObj->setDBEncoding("ISO-8859-1");
    $xmlExportObj->setXMLEncoding("ISO-8859-1");
    $xmlExportObj->setXMLFormat("NODES");
    $xmlExportObj->setRootNode("Category");
    $xmlExportObj->setRowNode("Type");
    $xmlExportObj->Execute();
    // End XMLExport data
    ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN" "
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="
    http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=utf-8" />
    <title>example</title>
    <link href="css.css" rel="stylesheet" type="text/css"
    />
    </head>
    <body>
    </body>
    </html>
    <?php
    mysql_free_result($data);
    ?>
    Thanks again

  • How to get the value from select list to text box

    Hi,
    I have a select list i want to retrieve the value from select list to text box.
    How can i do that???
    Regards,
    Sakthi.

    Hi Sakthi,
    Yo can use the Java script for that..
    Dynamically the value will come into text box.
    Use the below script.
    <script type="text/javascript">
    function disFormItems()
    var lReturn = $v(here your select list name)
    alert(lReturn);
    document.getElementById(here your text box name).value =lReturn; }
    </script>Cheers,
    Shan

  • Get value from the array based on the HashCode

    public static void runJoin(int[][] t1,int[][] t2)
         PrintWriter out=null;
         int rows = 1000;
         int cols = 7;
         int [][] myTable3 = new int[rows][cols];
         int x = 0;
         System.out.print("Running HashJoin:Method loads the "+
         "smaller table in the memory and applies a hashing function "+
         "to common column and stores it in another table. "+
         "The larger table is then read from the file. "+
         "The same hashing function is applied to Col n of the table and a       matching record in the first table is looked up. A match will create a row in Table 3. ");          
    //Apply hashing function to smaller table and store it in the memory.
              Integer[] It2 = new Integer[t2.length];
              int [] hashCodest2 = new int[t2.length];
              Hashtable ht = new Hashtable();
              for(int i =0; i <t2.length;i++){
                   It2[i] = new Integer(t2[0]);
                   hashCodest2[i] = It2[i].hashCode();
                   ht.put(new Integer(hashCodest2[i]),It2[i]);
              //Larger table get hashcodes
              Integer It1[] = new Integer[t2.length];
              int [] hashCodest1 = new int[t2.length];          
              for(int j =0; j <t1.length;j++){
                   It1[j] = new Integer(t1[j][4]);
                   hashCodest1[j] = It1[j].hashCode();               }
              //Based on the hashcode get the value from the Table2;
              try{
    out = new PrintWriter( new FileOutputStream( "c:\\HashJoinTable.txt" ) );
              Enumeration e = ht.keys();
                   while(e.hasMoreElements())
    //How do I get the value from the array based on the HashCode? Do I need to do a loop here???                         
    hashCodes1.get(e.nextElement());           
              }catch(Exception e){}

    ok I got it......
              //Apply hashing function to smaller table and store it in the memory.
              Integer[] It2 = new Integer[t2.length];
              int [] hashCodest2 = new int[t2.length];
              Hashtable ht = new Hashtable();
              for(int i =0; i <t2.length;i++){
                   It2[i] = new Integer(t2[0]);
                   hashCodest2[i] = It2[i].hashCode();
                   ht.put(new Integer(hashCodest2[i]),It2[i]);
              //Larger table get hashcodes and compare
              Integer It1[] = new Integer[t2.length];
              int [] hashCodest1 = new int[t2.length];          
              Hashtable ht2 = new Hashtable();
              for(int j =0; j <t1.length;j++){
                   It1[j] = new Integer(t1[j][4]);
                   hashCodest1[j] = It1[j].hashCode();               
                   ht2.put(new Integer(hashCodest1[j]),It1[j]);
              //Based on the hashcode get the value from the Table2;
              try{
    out = new PrintWriter( new FileOutputStream( "c:\\HashJoinTable.txt" ) );
              Enumeration e = ht.keys();
              Integer t3[] = new Integer[t2.length];
                   while(e.hasMoreElements())
                        t3[x] = (Integer) ht2.get(e.nextElement());                
                        x++;
              }catch(Exception e){}

  • Do I need to get authorization from the software owner?

    I am using Captivate to do a software simulation. Do I have to get authorization from the software owner for sale my simulation of his software? Is the screencapture are copyrighted?
    Thank you.

    I'm actually trying to find out about using screenshots of Adobe software. I've done some Premiere Pro tutorials and I'd like to monetize them on YouTube but their conditions state "You can monetize videos showing software user interface only if you have a contract with the publisher or you have paid a licensing fee".
    I'm hoping that Adobe's Permissions and trademark guidelines (http://www.adobe.com/misc/permissions.html) would be enough but there's a problem there too. Adobe's conditions state "Your use must contain the entire screenshot. You may not use portions of the screenshots". That's hopelessly restrictive - obviously I want to be able to zoom in and show closeups of the interface. There's a form to apply for special permission (http://www.adobe.com/misc/pdfs/PermissionRequestForm.pdf) but it's not practical (e.g. every single usage must be renewed annually). I can't believe that all those tutorial producers on YouTube are jumping through these hoops to get the right permissions.
    So what is everyone doing? Just ignoring the whole permission thing and hoping for the best?

  • To get the input values from the dynamic tables and save in the SAPdatabase

    HI EXPERTS,
    I AM NEW TO WEB DYNPRO ABAP. MY QUERY IS HOW TO GET THE VALUES THE USER ENTERS IN THE DYNAMIC TABLE AND SAVE THE SAME IN THE SAP DATABASE. I HAVE CREATED THE TABLES BUTTON EVERYTHING BUT I DONT KNOW THE CODE HOW TO DO. PLEASE HELP ME OUT.

    >
    vadiv_maha wrote:
    > HI EXPERTS,
    >
    > I AM NEW TO WEB DYNPRO ABAP. MY QUERY IS HOW TO GET THE VALUES THE USER ENTERS IN THE DYNAMIC TABLE AND SAVE THE SAME IN THE SAP DATABASE. I HAVE CREATED THE TABLES BUTTON EVERYTHING BUT I DONT KNOW THE CODE HOW TO DO. PLEASE HELP ME OUT.
    hi,
    1 there is one property OnAction of the button...
    2 So, in this event handler,you have to read the context node to which ur table is binded
    3 use the code wizard
    control+f7
    , and use the method
    get_static_attribute_table
    4 now u have got the vaues in internal table,so now as pointed in the previous reply, you can use the
    Update
    or
    Modify
    statement...
    regards,
    Amit

  • Re: Help needed in passing values from workflow to Approve Forms

    Dear Experts,
    how do I pass values from a workflow to a step (Form) - approve form?
    I am using a customized table structure as my data source (FORMCONTAINERELEMENT) but am stuck on how to access the data when i get to to the screen painter's flow logic... What am i missing? Can you give me a step by step example. the ones i see on the net are input fields that update the screen... nothing that shows value being passed from the outside.
    I need to pass an exisitng value in the workflow into the form for approval of the the assigned agent.
    Please help!!
    Thank you.

    Hello !
             Create a method just before the form step.This method should populate the values for the fields maintained in the form.
             Pass the values populated from this method to your customized table structure (data source).In other words, you have to pass all the values to the workflow container.
            To the step, pass this workflow container by binding.In the control tab of form step, you have to do the binding.
    Regards,
    S.Suresh

  • Help needed in extracting values from XML

    SAMPLE XML:
    - <Form1>
    - <Name>
    <Ttl>MR</Ttl>
    <Fore>ABC1</Fore>
    <Sur>XYZ2</Sur>
    </Name>
    - <Address>
    <Line>ADD_LINE_1</Line>
    <Line>ADD_LINE_2</Line>
    <PostCode>PST CDE</PostCode>
    </Address>
    <BirthDate>0001-01-01</BirthDate>
    - <Details>
    <TotalEarnings>1234567.00</TotalEarnings>
    <TotalDeduction>12345.00</TotalDeduction>
    </Details>
    </Form1>
    - <Form1>
    - <Name>
    <Ttl>MR</Ttl>
    <Fore>ABC2</Fore>
    <Sur>XYZ2</Sur>
    </Name>
    - <Address>
    <Line>ADD_LINE_3</Line>
    <Line>ADD_LINE_4</Line>
    <PostCode>PST CDE</PostCode>
    </Address>
    <BirthDate>0002-02-02</BirthDate>
    <Gender>female</Gender>
    - <Details>
    <TotalEarnings>12345.00</TotalEarnings>
    <TotalDeduction>123.00</TotalDeduction>
    </Details>
    </Form1>
    There can be any 'n' number of <Form1>'s in one XML.But I want to get only the details of the person whose TotalEarnings>1million. Details include
    Name->Ttl,Fore,Sur
    which in this case would be MR,ABC1,XYZ1
    Address->Line,Line,Postcode
    which in this case would be ADD_LINE_1,ADD_LINE_2,PST CDE
    Birthdate
    which in this case would be 0001-01-01
    Gender
    which in this case would be "null" as there is no Gender tag present
    Details->TotalEarnings,TotalDeduction
    which in this case would be 1234567.00,12345.00
    The technique I was using is,
    1. Convert to clob
    2. User dbms_instr find the location of <Form1> in a loop
    3. For every occurence of <Form1> I find <TotalEarnings> value and check if this is greater than 1 million.
    4. If true, I use dbms_instr to get the values of all the tags inside <Form1>
    5. The drawback of using dbms_instr is that it gets the value of first occurence of whatever sting we supply.In this case dbms_instr(xml,'<Gender>',position of Form1) will not return null whereas it will return "Female" from the next form. This is wrong as it doesnt belong to the person who earns more than a million.
    Can anyone suggest a way to fetch the values that only belong to the form of the person who earns more than a million?

    There can be any 'n' number of <Form1>'s in one
    XML.Not if you want the XML to be valid there can't. You would need a root element around all the <Form1>'s to make it valid.
    The technique I was using is,
    1. Convert to clob
    2. User dbms_instr find the location of <Form1> in a
    loop
    3. For every occurence of <Form1> I find
    <TotalEarnings> value and check if this is greater
    than 1 million.
    4. If true, I use dbms_instr to get the values of all
    the tags inside <Form1>
    5. The drawback of using dbms_instr is that it gets
    the value of first occurence of whatever sting we
    supply.In this case
    dbms_instr(xml,'<Gender>',position of Form1) will not
    return null whereas it will return "Female" from the
    next form. This is wrong as it doesnt belong to the
    person who earns more than a million.
    Can anyone suggest a way to fetch the values that
    only belong to the form of the person who earns more
    than a million?Why on earth are you using dbms_instr for this? Oracle has built in XML functionality for use against XMLTYPE data, such as the ExtractValue method and the use of XPATH expressions.
    I'd suggest you start reading some of the manuals regarding XML functionality in Oracle rather than trying to manually parse it all.

  • Help needed to get content from SOAPMessage response

    hi All
    i have a small problem with accessing the content of a SOAPMessage. the soap message would look like :
    <?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:soap="http://schemas.
    xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance
    " xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><GetAvailabilityRespon
    se xmlns="xxx"><Get
    AvailabilityResult>Y1</GetAvailabilityResult></GetAvailabilityResponse></soap:Bo
    dy></soap:Envelope>
    my problem is that i can only get a value from
    Source sourceContent = replySoap.getContent();
    which is the entire thing as above. how can i get the value from <GetAvailabilityResult> element? i tried to do the steps like, get the SOAP part, and then the SOAP Envelope and then the SOAP Body from SOAPMessage, but all turned out to be null. only the content has a value. thanks for ur help in advance.

    When I open scanner and camera wizard on my computer, it does try to communicate with the phone. Then a box shows that it is imagining device is busy, or may be in use by another application. I can choose to cancel or wait till the device will be available. When I open properties it does the same, it never opens the properties, Is that helpful? .

  • How to get values from the page excpet pagecontext.getparameter

    i have a requirement wherein i am passing paramteres from the "submit" button.but the problem being that,i have multiple rows in my page.what is happening is that my "submit" button is passing the values of the previous row,instead of the current row.this is i think because "commit" gets called later and params are passed before it.
    how do i solve this problem
    or if i can get to get paramteres in a advance table layout,i l be able to achieve my requirement.beacuse in advance table layout,i am not able to do pagecontext.getparameter("---" of the item

    thanks guys,
    i did try working with row refrence but it returns a null only.
    my requirement was that i had update functionality as well as "add new rows" on the same advtbl bean.an whenevr i click on "add new row" and submit,i was always gettin the parameters for the previous row.
    now,i have got a workaround to that,by having a radio button to select rows to update and whenever i click on "add new rows" ,i disable the radio button,and get the handle based on the value from radio group.
    but still row refrence dint work for me.i will appreciate if sum1 can send me the code

  • If I get the Apple Universal Dock , what cable do I then need to get video from the dock to my HDTV . What about audio ?

    If I get the Apple Universal Dock , what cable do I then need to get video to my HDTV ? What about the audio portion ?

    OK, so that part is correct. Then, do I just hookup and it automatically goes onto my computer? What will capture it, or will it simply show on my desktop and I need to open it with...what?

  • Help:Need to get rid of the space.

    Hello Folks.
    I am having an extra space between monthname and year in the folllowing query. Can anybody throw some light on how to get rid of the extra space between.
    Thanks a lot
    (to_char(trunc(sysdate,'MM')-1,'MONTHYYYY')
    output:(currently)
    JANUARY  2010

    Hi,
    The format you want is 'fmMONTH YYYY'
    'MONTH' always returns a string of the same length, right-padded with blanks to be as long as the longest month name. In English, the longest month name is 'SEPTEMBER' (9 characters), so January (7 characters) gets padded with 2 extra spaces; May would get 6 spaces.
    'FM' in the format means "lose the padding". Since you want a space (exactly one space) between the month and year, put exactly one space in the format string.
    The complete TO_CHAR expression is:
    TO_CHAR ( TRUNC (SYSDATE, 'MM') -1
         ,'fmMONTH YYYY'
         )

  • Get value from select list created using htmldb_item.SELECT_LIST_FROM_LOV

    I have created a tabular form using the HTMLDB_ITEM functions and now in the javascript, I need to determine the value in another column created using the SELECT_LIST_FROM_LOV function and then set the value under certain circumstances. Unfortunately, I do not know the correct syntax. My Javascript function is being called properly, I am just unable to get or set the field.
    I am calling my javascript function from another column on the tabular form passing in the current row number and f09 is my column.
    Below is my code. Unfortunately, none of the below are working.
    function f_setCurrency(a_row)
    var l_Currency = html_GetElement('f09_'+a_row);
    html_SetSelectValue(l_Currency, 2);
    alert(html_GetSelectValue(l_Currency ));
    alert($x(l_Currency).value);
    alert($x('f09_'+a_row).value);
    alert($v('f09_'+a_row));
    alert($x('f09_'+a_row).innerHTML);
    }

    Brian,
    This example:
    http://htmldb.oracle.com/pls/otn/f?p=31517:176
    and this example:
    http://htmldb.oracle.com/pls/otn/f?p=31517:160
    may help you.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • Formatting value in the dynamically created table

    Hi,
    I have created table dynamically.
    In that, if the columns going to be number datatype,
    <af:convertNumber pattern="##########"/> , i want to apply this pattern,
    if the column going to be date,
    <af:convertDateTime pattern="DD/mm/yyyy" /> , i want to apply this pattern.
    Code Snippet for dynamically created UI table,
    <af:table rows="#{bindings.DynamicVO.rangeSize}"
    fetchSize="#{bindings.DynamicVO.rangeSize}"
    emptyText="#{bindings.DynamicVO.viewable ? 'No data to display.' : 'Access Denied.'}"
    var="row" rowBandingInterval="0"
    value="#{bindings.DynamicVO.collectionModel}"
    selectedRowKeys="#{bindings.DynamicVO.collectionModel.selectedRow}"
    selectionListener="#{bindings.DynamicVO.collectionModel.makeCurrent}"
    rowSelection="single" id="t1">
    <af:forEach items="#{bindings.DynamicVOIterator.attributeDefs}" var="def">
    <af:column headerText="#{def.name}" sortable="true" rendered="#{def.hints.displayHint!='Hide'}"
    sortProperty="#{def.name}" id="hisc1">
    <af:outputText value="#{row[def.name]}" id="othis1">
    </af:outputText>
    </af:column>
    </af:forEach>
    </af:table>
    How to apply the pattern for the ouput text dynammically depending on the data type.
    My Jdeveloper version is 11.1.1.3.0
    Reg,
    vini

    Any help on the above scenario?

Maybe you are looking for

  • Upgrading for OS 10.4.11 (Tiger) to 10.6 (Snow Leopard)

    I have a 24" iMac with a 2.8 GHz Intel Core 2 Duo processor and 4GB od memory. I bought the Mac Box Set and tried installing Snow Leopard. Everything went fine. Until it came time to restart. It only gets as far as the background image coming up, a m

  • [svn:fx-4.x] 14985: Add support for mirroring for both error tips and tool tips in positionTip ().

    Revision: 14985 Revision: 14985 Author:   [email protected] Date:     2010-03-24 09:40:24 -0700 (Wed, 24 Mar 2010) Log Message: Add support for mirroring for both error tips and tool tips in positionTip().  The layoutDirection of the toolTip will be

  • Unable to play preview clip on timeline Premiere Elements 10

    All of a sudden, I'm unable to preview clips, even in unfinished projects that used to work. I'm running Premiere Elements 10, Windows 8.1, Flash updated etc. These clips are activated, not rendered (red line above) but doesn't show. However, if I pl

  • App for folder icons N97

    Is there a way to make different icons for folders within the menu screen. I have quite a few apps and like to keep just one page per screen which means I need a lot of folders. however each folder is the same icon. Is there an app that allows me to

  • Manual for PIX 506E?

    Hi everyone! I just became in charge of a PIX 506E, which I have no experience with. I was not told how it was set up, what the password is, etc...Oh, and the dongle for the console connection is non-existent as well. On Cisco's website, I can't find