To get the value of Dynamically generated Items

Hi , i am Writting an applications using HTMLDB, i have a page which is an input page for inputting number of hours you worked on different projects i am createing the Input text filed items dynamically through web PL/SQL , what i want to do is when the user click on the sumbit button i want to read the values of the ITem and insert into a table , since they are dynamically created Items how does HTML DB handle them is there a way to get the Value for the items i tried displaying &P9_1. which is one of the items created dynamicaly but empty value is displayed.
Any assiatnce is of great help.
Thanks in advance
Bharath

This is done once the page is submitted, and the values are available in the arrays e.g. htmldb_application.g_f01 etc.
This is covered in the manual

Similar Messages

  • How to Get the values from Dynamic jasp page

    Hi,
    I have a jsp form page wherein i input the data form the user and get these values on the action servlet.
    But now i have added a feature to Add and Delete the Elements using javascript and this creates a dynamic form on the jsp page. I want to Get the values of these all elements at the Action servet.
    Please suggest the solution.
    Thanks,
    JavaQueue

    getParameterMap() returns a Map[1] with all parameters; the parameter name is the key and the value is the value of the parameter in the form of String arrays.
    You have to iterate over the Map and get values as you see fit. Search for a tutorial/ example/ sample for using Maps. I'm sure you'll find loads that will do a better job at explaining.
    [1] http://java.sun.com/j2se/1.4.2/docs/api/java/util/Map.html
    People on the forum help others voluntarily, it's not their job.
    Help them help you.
    Learn how to ask questions first: http://faq.javaranch.com/java/HowToAskQuestionsOnJavaRanch
    ----------------------------------------------------------------

  • How to get the value of a clicked item in a shuttle control

    I have a shuttle control (P8_SHUTTLE) that lists then names from scott.emp.
    Now I want to create a dynamic action that fires when I click on one of the names on the left side of the shuttle control.
    I want the dynamic action to recognize the name of the employee that was clicked, and then set the value of a text item (P8_LAST_VALUE) to that ename. (Eventually I want to display the department of that employee in the other text item).
    Here are screen shots of my DA:
    http://www.screencast.com/t/42klMC0Hbk
    http://www.screencast.com/t/Y5lZ4RsaLUI
    Currently, when I click an item in the shuttle control, the text item P8_LAST_VALUE remains blank.
    Thanks,
    Christoph

    Hi Christoph,
    you have to change your jQuery selector in the When section of the Dynamic action to #P8_SHUTTLE_LEFT.
    The shuttle item P8_SHUTTLE is build from to select lists P8_SHUTTLE_LEFT and P8_SHUTTLE_RIGHT.
    regards,
    Erik-jan

  • How do I get the value of a comboBox item that is in a grid?

    Hi all,
    I have a data grid that has comboBoxes in two of its columns.
    What I need to do is get the values of those bombo boxes when a user highlights the row of the grid NOT when the user uses the comboBox. I understand how to pull the values out once the change handler is invoked on the comboBox, but I'm not seeing a way to get at the comboBoxes that belong to the currently highlighted gridRow.
    I'm sure it's really straight forward, but I'm just not able to find any reference on how it's done. Any help greatly appreciated.

    This code shows how you can do it if you know the dataProvider fields for the ComboBox data.
    If this post answered your question or helped, please mark it as such.
    <?xml version="1.0"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
       initialize="initData()">
       <mx:Script>
       <![CDATA[
        import mx.events.ListEvent;
          import mx.collections.*;
          private var DGArray:Array = [
             {Artist:'Pavement', Album:'Slanted and Enchanted', Price:11.99, combo1: [1,2,3], combo2: [100,200,300]},
             {Artist:'Pavement', Album:'Brighten the Corners', Price:11.99, combo1: [2,4,6], combo2: [200,400,600]}];
          [Bindable] public var initDG:ArrayCollection;
          public function initData():void {
             initDG=new ArrayCollection(DGArray);
          private function dgChangeHandler(event:ListEvent):void{
           var ac:ArrayCollection = event.currentTarget.dataProvider;
           txt.text = "";
           txt.text += ac.getItemAt(event.rowIndex).combo1 + "\n";
           txt.text += ac.getItemAt(event.rowIndex).combo2;
       ]]>
       </mx:Script>
       <mx:DataGrid id="myGrid" width="350" height="200"
          dataProvider="{initDG}" change="dgChangeHandler(event);">
          <mx:columns>
             <mx:DataGridColumn dataField="Artist" />
             <mx:DataGridColumn dataField="Album" />
             <mx:DataGridColumn dataField="Price" />
             <mx:DataGridColumn dataField="combo1">
              <mx:itemRenderer>
               <mx:Component>
                <mx:VBox>
                 <mx:ComboBox dataProvider="{data.combo1}"/>
                </mx:VBox>
               </mx:Component>
              </mx:itemRenderer>
             </mx:DataGridColumn>
             <mx:DataGridColumn dataField="combo1">
              <mx:itemRenderer>
               <mx:Component>
                <mx:VBox>
                 <mx:ComboBox dataProvider="{data.combo2}"/>
                </mx:VBox>
               </mx:Component>
              </mx:itemRenderer>
             </mx:DataGridColumn>
          </mx:columns>
       </mx:DataGrid>
       <mx:TextArea id="txt" width="100%" height="100%"/>
    </mx:Application>

  • How do you get the value of a selected list item?

    I have a drop-down list that the user can choose from. How do I get the value of what they selected? I thought I could do this by using the NAME_IN function, but I'm getting FRM-40105 Unable to resolve reference to item X. I don't know what I'm doing wrong.
    Thanks!

    Hi,
    You can use an WHEN-LIST-CHANGED trigger, attached to the list-item itself. And, in this trigger, you can use the name of the item to refer its value.
    For example:
    :block_name.list_item_name
    John

  • Getting the value of a checkbox in an item renderer?

    I have a list that uses an item renderer with buttons and data.  I need to add a checkbox and get the value of this checkbox passed along with the event of the pushbutton.
    When the user clicks "add to menu: there is a click handler:
    protected function addButton_clickHandler(event:MouseEvent):void
                        doubleIt = double.selected;
                        owner.dispatchEvent(new Event("ADD_TO_MENU", true));
    Back in the main application, there is a listener for this event.  I want that handler to be able to "know" the status of that checkbox (i.e. the value of "doubleIt", defined as a public boolean).
    private function addToMenuHandler(event:Event):void {
               var i:int = event.target.selectedIndex;
               var obj:Object = new Object();
               obj = recipeListCollection.getItemAt(i);
               menuList += obj;
    I have tried various permutations of the event.target, but can't figure out how to access that variable.

    Create a custom event and stuff anything you want in there.
    Alex Harui
    Flex SDK Developer
    Adobe Systems Inc.
    Blog: http://blogs.adobe.com/aharui

  • Getting the value of the selected items of the shuttle

    Hi Steve,
    How to get the selected items of the shuttle in the backing Bean upon clicking submit button?
    Regards,
    Gareth

    Check the ADF Developer Guide and the SRDemo
    application for a sample of using the shuttle
    http://download.oracle.com/docs/html/B25947_01/web_com
    plex008.htm#CEGHACEDHow to get the values from leading list. I have a pop-up with selectManyShuttle. The leading list values are retreived from from emailTable and there is no default values in the trailing List. When I click ok in the popup, the selectedValues is null.
    here is my code:
    <af:form>
    <af:selectOneChoice label="" valuePassThru="true" valueChangeListener="#{backingpsEmailUserContact.refreshSelectedList}" id="usercontactid" autoSubmit="true">
    <af:selectItem label="User" value="user"/>
    <af:selectItem label="Contact" value="contact"/>
    </af:selectOneChoice>
    <af:panelHorizontal valign="bottom" partialTriggers="usercontactid">
    <af:selectManyShuttle
    trailingHeader="Chosen"
    leadingHeader="Email"
    trailingDescShown="true"
    leadingDescShown="true"
    size="10"
    value="#{backingpsEmailUserContact.selectedValues}" >
    <f:selectItems value="#{backingpsEmailUserContact.allItems}"/>
    </af:selectManyShuttle>
    <af:commandButton text="Ok" action="#{backingpsEmailUserContact.cmdOk}" id="cmdOkid" partialSubmit="true"/>
    </af:panelHorizontal>
    </af:form>
    backingBean method
    public void cmdOk(){
    Object selectedList = this.getSelectedValues();
    // for (int i = 0; i < selectedList.size();i++){
    // System.out.println((String)selectedList.get(i));
    }

  • Getting the value of variable dynamically

    Hi Gurus,
    How can i get a value of a variable dynamically through user input?Is it possible to get it interacively?
    my reqiurement is to control my loop according to the user supplied value for the flag variable.
    if the user gives the flag as 'Y' loop should continue.else loop should terminate in a PL/SQL block
    here is a piece of code
    CREATE OR REPLACE procedure c is
    flag1 varchar2(10):='Y';
    begin
    while flag1 <> 'N' loop
    dbms_output.put_line('Enter the value.....' );
    +*<< Here I have to get the value of flag1 from user .How to get the user value>>*+
    end loop;
    end;
    Please advice
    Edited by: user5203944 on Nov 18, 2008 3:01 AM

    To add my 2 cents worth you can not get where you want with sqlplus calling PL/SQL
    You have 2 problems
    SQLPLUS has no loop construct and not much in the way of conditional capabilities.
    PL/SQL can not talk to a terminal.
    If you use an &variable in an anonymous block, it is evaluated by sqlplus before the parse of the block takes place.
    Nothing you do in the block can change its value.
    dbms_output.put_line buffers everything output to it and then sqlplus outputs it all after the block completes.
    You can accept variables in sqlplus and pass them into an anonymous block for use, but you would have to exit the block if you wanted to ask something based on a condition determined in the block. You would then have no way to re-enter that block within the sqlplus session.
    Host language programs do not have this problem. You can use ProC ProCOBOL, OCI, Visual Basic, and web interfaces.
    Unless you are on windows you can use a shell script (Unix, Linux or VMS) to do what you want.
    You can accept the variable in the script within a loop. You can call sqlplus silently passing the variable on the command line. You can use the variable command to define variables that will be set in pl/sql blocks use selects of these :variables to set defined sqlplus &variables. You can spool files that will then be processed by the shell language. All this can be done in that shell loop.
    In other words you can do anything you need. You do need to understand your tools and their limitations. You can not use sqlplus commands in pl/sql for example.
    Edited by: Old DBA on Nov 18, 2008 7:31 PM

  • How to get the values of 2 dynamic comboboxes in one jsp to another jsp?

    I have 2 comboboxes and one submit button on my jsp page.I select a value in 1st combobox then the values in the second combobox populated from the database. next i select 2nd combobox and then submit the button.After submit the button call the next jsp page. In that page i want to display the values of two comboboxes. but my problem is , in that page only 2nd combobox value is displayed.1st combobox is displayed as null. plz tell me, how to get the values of two comboboxes at a time?
    Select.jsp:
    <%@ page language="java" import="java.sql.*" %>
    <%!
         Connection con = null;
         Statement  st  = null;
         ResultSet  rs  = null;
         String     sql = null;
         void addItems(javax.servlet.jsp.JspWriter out, String sql)
           try{     
              rs = st.executeQuery(sql);
              while( rs.next() )
                   out.println("<option>" + rs.getString(1) + "</option>");               
         }catch(Exception e)
                   System.out.println(e);
    %>
    <HTML>
    <HEAD>
    <TITLE>JSP WITH  MULTIPLE FORMS</TITLE>
    <script language="javascript">
              function checking()
                        form1.submit();
         </script>
    </HEAD>
         <body>
             <center>
             <b><font size="5" color="#333399">Staff ID:</font></b></center>
                     <FORM NAME="form1" METHOD="POST" ACTION="Select.jsp">
                         <p align=center>
                         Details of Staff :  
                       <SELECT 1 NAME="type" onchange="checking();">
                                    <option> Administrator </option>
                              <option> OfficeAssistent </option>
                              <option> Clerk </option>
                                  </SELECT 1>
                          </p>
    </FORM>
                      <FORM NAME="form2" METHOD="POST" action="welcome1.jsp">
                      <center>
                          <TABLE><TR><TD>Staff ID:</TD>
                                 <TD><SELECT 2 NAME="staff_id">
                    <%    
            String type = request.getParameter("type");
            try {
            Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
            con = DriverManager.getConnection("jdbc:odbc:java","system","manager");
            catch (ClassNotFoundException ex) {
                   System.out.println(ex);
            catch (SQLException ex)
                System.out.println(ex);
         st  = con.createStatement();
         sql = "select staff_id from "+type+"";
         addItems(out, sql);
    %>
              </SELECT 2>
           </TD>
         </TR>
    </table></center>
    <h2> Details of <%= type + "s" %> </h2>
                         <center><input type=submit value=ok onclick="submit();"></center>
                  </FORM>
         </BODY>
    </HTML>
    welcome1.jsp
    <center><h1>WEL COME</h1></center>
    <%    
            String type = request.getParameter("type");
            String sid = request.getParameter("staff_id");
    %>
    <h2> Details of <%= type + "s" %> </h2>
    <h2> Details of <%= sid %> </h2>

    <SELECT 1 NAME="type" onchange="checking();">
                                    <option value = "0"> Administrator </option>
                              <option value = "1"> OfficeAssistent </option>
                              <option value = "2"> Clerk </option>
                                  </SELECT 1>

  • How to get the values

    Hi All..
    am developing a transaction where users will place an order..but..my question is..
    i have one input box and one button on the screen form...these 2 are created dynamically..
    I have event handlers like this..
    class cl_my_event_handler definition.
    public section.
    methods:
    input_enter for event entered of cl_dd_input_element importing sender,
    click_button for event clicked of cl_dd_button_element importing sender,
    I have these 2 events..when hit enter this is fetching the value in the input box..which is fine..because it will give the sender->name and sender->value.
    but i wanted to get the value in the input box as well with the button name when i click the button.
    as there are events associated to these at runtime.how can i get the value in the input box when i click the button..
    Please help..
    Thanks in advance..
    Suresh.

    push button and function code are dynamically generated,
    I have assigned the event input enter to the input element and click button to push button..when i click on push button how can i get the value in the input box?
    can i get the value in the input element when i click the button?
    am using methods and events.
    please help..
    Thank you,
    Suresh.

  • How Can I get the value of a variable name stored in another variable?

    I have a scenario wherein i get a record as %rowtype as input parameter into my function and i generate a dynamic sql to check the validity of a particular value in one of the columns of the input parameter record.
    I have a variable that stores the column name of input parameter record whose value is to be validated.
    The dynamic SQL looks like this:
    'Select empno from emp where empname = input_rec.'||v_colname
    While using Execute Immediate I get the error - Invalid Identifiier -'input_rec'.'ename'
    On Googling I found that the input parameter is out of the scope of the SQL that's being executed in the Execute Immediate.
    Is there any way I can get the value of ('input_rec.'||v_colname) so that I can pass it into the Execute Immediate with 'Using' clause?

    karthyk wrote:
    I have a scenario wherein i get a record as %rowtype as input parameter into my function and i generate a dynamic sql to check the validity of a particular value in one of the columns of the input parameter record.
    I have a variable that stores the column name of input parameter record whose value is to be validated.
    The dynamic SQL looks like this:
    'Select empno from emp where empname = input_rec.'||v_colname
    While using Execute Immediate I get the error - Invalid Identifiier -'input_rec'.'ename'
    On Googling I found that the input parameter is out of the scope of the SQL that's being executed in the Execute Immediate.
    Is there any way I can get the value of ('input_rec.'||v_colname) so that I can pass it into the Execute Immediate with 'Using' clause?compose the SELECT in a single VARCHAR2 variable before passing variable to EXECUTE IMMEDIATE

  • All I want to do is get the value associated..

    All I want to do is get the value associated with a dropdown item...
    1. I have a combo box
    2. It has text values that you can click
    3. The text values have export values associated with it
    4. When I click a text value from the list, I want to get the numeric value associated with it
    Example combo box:
    "Orange" has the export value of "1234"
    When I click "orange" I want to get the export value "1234" and alert it to the screen
    I'm using javascript, here's what I have so far:
    In the combo box properties I have the following validation script:
    theFruitClicked();
    I have a function in the document javascript:
    function theFruitClicked()
         app.alert(event.value);
    This is alerting the text value not the export value.
    What else should I do to get the export value?
    Thank You.

    You may need the scripting forum http://forums.adobe.com/community/acrobat

  • How can we get the values from the view?

    Hi All,
    my scenario is i have two fields in my view .one is parameter.and another on is select-options.how can i get the user entered values into my selection screen.?
    for the select options i get the values into field-symbol.for parameter i get the value using get_attribute.
    can i use like this in select statement.
    WHERE SERVICE_ID  = ZSD_DD_AUFNRS
                       AND CRE_DT IN <FS_DATE>.
    Regards,
    Ravi.

    Hi Sravan,
    when i am using the below code to generate self defined functions i m getting a error .
    *Generate an object for self defined functions
      DATA: lo_self_functions TYPE REF TO if_salv_wd_function_settings,
    *Generate an object for button 'Confirm'
           lr_button TYPE REF TO cl_salv_wd_fe_button,
           lo_self_function TYPE REF TO cl_salv_wd_function,
                  l_text type string.
    *Set Self-defined functions
    *'Confirm' Button
      lo_self_functions ?= l_value..
      lo_self_function = lo_self_functions->create_function( 'CONFIRM'  ).
      CREATE OBJECT lr_button.
      CLEAR l_text.
      l_text = 'Confirm'.
      lr_button->set_text( l_text ).
      lr_button->set_image_source( '' ).
      lr_button->set_image_first( 'X' ).
      lo_self_function->set_editor( lr_button ).
    Error when processing your request
    What has happened?
    The URL http://cgslsvr3.cgsl.com:8020/sap/bc/webdynpro/sap/zsdr_cash_work_list/ was not called due to an error.
    Note
    The following error text was processed in the system CGD : WebDynpro Exception: IDs Can Only Contain Characters of Syntactical Character Set
    The error occurred on the application server cgslsvr3_CGD_20 and in the work process 0 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    Method: RAISE of program CX_WD_GENERAL=================CP
    Method: CONSTRUCTOR of program CL_WDR_VIEW_ELEMENT===========CP
    Method: CONSTRUCTOR of program CL_WD_TOOLBAR_BUTTON==========CP
    Method: NEW_TOOLBAR_BUTTON of program CL_WD_TOOLBAR_BUTTON==========CP
    Method: IF_SALV_WD_COMP_TABLE_UI~CREATE_TOOLBAR_ITEM of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    Method: IF_SALV_WD_COMP_TABLE_UI~CREATE_TOOLBAR_ITEMS of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    Method: IF_SALV_WD_COMP_TABLE_UI~UPDATE_TOOLBAR_ITEMS of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    Method: IF_SALV_WD_COMP_TABLE_UI~UPDATE_TOOLBAR of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    Method: IF_SALV_WD_COMP_TABLE_UI~UPDATE of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    Method: IF_SALV_WD_VIEW~MODIFY of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    What can I do?
    If the termination type was RABAX_STATE, then you can find more information on the cause of the termination in the system CGD in transaction ST22.
    If the termination type was ABORT_MESSAGE_STATE, then you can find more information on the cause of the termination on the application server cgslsvr3_CGD_20 in transaction SM21.
    If the termination type was ERROR_MESSAGE_STATE, then you can search for more information in the trace file for the work process 0 in transaction ST11 on the application server cgslsvr3_CGD_20 . In some situations, you may also need to analyze the trace files of other work processes.
    If you do not yet have a user ID, contact your system administrator.
    Error code: ICF-IE-http -c: 110 -u: CT-0024 -l: E -s: CGD -i: cgslsvr3_CGD_20 -w: 0 -d: 20080414 -t: 105835 -v: RABAX_STATE -e: UNCAUGHT_EXCEPTION
    HTTP 500 - Internal Server Error
    Your SAP Internet Communication Framework Team
    How can i resolve it?
    Regards,
    Ravi

  • How to get the values of an Array using JSP Tags

    Hey guys,
    I need some help. I've splited a String using
    fn:split(String, delim) where String = "1,2,3,4" and delim is ,
    This method returns an Array of splited Strings. how do i get the values from this array using jsp tags. I don't wanna put java code to achive that.
    Any help would be highly appreciated
    Thanks

    The JSTL forEach tag.
    In fact if all you want to do is iterate over the comma separated list, the forEach tag supports that without having to use the split function.
    <c:set var="list" value="1,2,3,4"/>
    <c:forEach var="num" items="${list}">
      <c:out value="${num}"/>
    </c:forEach>The c:forTokens method will let you do this with delimiters other than a comma, but the forEach tag works well just with the comma-delimited string.

  • How to get the value from select tag

    I am trying to do the exactly same thing as this select Demo does. I can not find out a way to get the value form the first select menu and use it to get all the values to form the second select menu.
    here is the web: http://www.4al.pl/phpAjaxTags/ . I am trying to do the same thing as the first demo shows!
    Here is part of my code:
            <!-->create the database connection <-->
            <%
            //Load the MySql Driver.
              Class.forName("com.mysql.jdbc.Driver");
              String url = "jdbc:mysql://localhost:3306/JunkDB";
              java.sql.Connection con = java.sql.DriverManager.getConnection(url, "", "");
              java.sql.ResultSet rsMake = con.createStatement().executeQuery("SELECT DISTINCT make FROM make_and_model ORDER BY make");
              String strMake= "";%>
            <!--Display the make list-->  
            <html:select property="make" value="make" size="1" name="make">
            <html:option value="---Select a Make ----"></html:option>
            <%while (rsMake.next()) {
              strMake = rsMake.getString("make");
              System.out.println("\tmake= " + strMake );%>
            <html:option value="<%=strMake.toString()%>"></html:option>       
            <%} //end while loop
            //<!--Display the model list-->%>  
            </html:select>
            <html:select property="model" value="model" size="1" name="model">
            <html:option value="---Select a model ----"></html:option>
            <%java.sql.ResultSet rsModel = con.createStatement().executeQuery("SELECT model FROM make_and_model WHERE make='" + strMake //I want to put the value of the MAkE over here so I can get the models form database+ "' ORDER BY model");%>
            <%while (rsModel.next()) {
              String strModel = rsModel.getString("model");
              System.out.println("\tmodel= " + strModel );%>
              <html:option value="<%=strModel.toString()%>"></html:option>
            <%} //end while loop
            con.close();
            System.out.println("connection closed");%>
            </html:select>
                <p><input id="notify" name="notify" class="notify" size="24" disabled="disabled" type="text"></p>
            <hr><br>
            </html:form>So how can I get the value of "make" so I can get all models for this kind of "make" ??
    Am I doing it right ??? Or I am going to a wrong direction ???
    Thanks for any input . I am new with JSP and struts

    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

Maybe you are looking for