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
-------------------------------------------------------------------

Similar Messages

  • 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

  • Resolved: Use value from select list in pl/sql block

    Hello,
    I have a form with a select list: P18_BONUSTYPE, the values of which come from a LOV.
    When the user clicks a button, a page process is used to insert a row into a table.
    When I use the :P18_BONUSTYPE bind variable in my insert statement I get an error "Invalid number" I get an "Invalid number" error. I assume that APEX is using the displayed text in that bind variable, not its actual (html option) value.
    I checked the HTML of the page, and the correct values are in the select list.
    Can someone tell me how to get the value into a bind variable that can be used in a pl/sql block for a page process?
    Thanks
    Message was edited by:
    Neeko
    Issue was a value in another item.

    Did you tried changing the value using "to_number"? (i.e. to_number(:P18_BONUSTYPE)).
    Max.

  • How to read value from select list

    Hi,
    i'm using jdev 10.1.3.1.0, adf, jsp and struts.
    i've made a simple viewobject 'bestyrer' (danish for department) and it contains a list of all available department in my organization.
    it appears in my jsp page as a dropdown list and when the user chose a specific department all employees in that department are shown as a master detail relationship.
    It works and its standard drag'n'drop in JDev.
    I need to know which department the user have chosen because the information i show to the user depends on it.
    my view look like this:
    SELECT KBestyrer.BESTYRER,
    KBestyrer.NAVN
    FROM K_BESTYRER KBestyrer
    bestyrer is a number and navn is the name of the department.
    the code generated in my jsp based on drag and drop is:
    <html:select property="KBestyrerView"
    disabled="${!bindings[\'KBestyrerView\'].updateable}"
    onchange="DataForm.submit();">
    <html:optionsCollection label="prompt" value="index"
    property="KBestyrerView.displayData" />
    </html:select>
    and the corresponding HTML generated is:
    <select name="KBestyrerView" onchange="DataForm.submit();"><option value="0" selected="selected">0 Vejdirektoratet</option>
    <option value="1">101 København</option>
    <option value="2">147 Frederiksberg</option>
    <option value="3">151 Ballerup</option>
    <option value="4">153 Brøndby</option>
    <option value="5">155 Dragør</option>
    <option value="6">157 Gentofte</option>
    <option value="7">159 Gladsaxe</option>
    <option value="8">161 Glostrup</option>
    <option value="9">163 Herlev</option>
    <option value="10">165 Albertslund</option>
    <option value="104">999 Andet</option></select>
    First of all i don't want the indexed values as values of my individual options but the real values as seen in fron of the name. i.e. 101 147 151 and so on.
    how do i obtain this and how do i read the value the user have chosen?
    hope to receive some help.
    thanks
    br
    kim gabrielsen

    Ok,
    thanks for the pointer. it clearifies a bit but i cannot make it work.
    I've created a second binding as described in the dokument which gives me another binding in the pagedef file:
    <attributeValues IterBinding="KBestyrerViewIterator" id="Bestyrer">
    <AttrNames>
    <Item Value="Bestyrer"/>
    </AttrNames>
    </attributeValues>
    i guess i should be able to reference this binding using 'Bestyrer' as the id.
    in my JSP page i insert the following:
    <html:select property="KBestyrerView"
    disabled="${!bindings[\'KBestyrerView\'].updateable}"
    onchange="inspect(this.form)" >
    <html:optionsCollection label="prompt" value="#{bindings.Bestyrer.getInputValue()}"
    property="KBestyrerView.displayData" />
    </html:select>
    but it fails with an error:
    org.apache.commons.beanutils.NestedNullException: Null property value for '#{bindings'     at org.apache.commons.beanutils.PropertyUtilsBean.getNestedProperty(PropertyUtilsBean.java:669)     at org.apache.commons.beanutils.PropertyUtilsBean.getProperty(PropertyUtilsBean.java:715)     at org.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.java:290)
    I've tried #{bindings.Bestyrer} and #{bindings.Bestyrer.inputValue()}
    but they fail too.
    so there is clearly something i don't understand regarding this binding stuff.
    Assuming i get this to work how do i actually accesss the value chosen by the user?
    as far as i recall in plain HTML i gave the select list a name like:
    name=MyList
    and called a javascript function like this:
    onchange="inspect(this.form)"
    in my JS function i could access the value like this:
    function inspect(form){
    alert(form.MyList.options[form.MyList.selectedIndex].text)
    but when i name the select list i receive an error:
    javax.servlet.jsp.JspException: Cannot find bean under name MyList     at org.apache.struts.taglib.html.SelectTag.calculateMatchValues(SelectTag.java:301)     at org.apache.struts.taglib.html.SelectTag.doStartTag(SelectTag.java:244)     at brugeroversigt.jspService(_brugeroversigt.java:75)     [brugeroversigt.jsp]
    I'm a bit confused here so any input would be appreciated.
    br
    kim gabrielsen

  • Unable to retreive values from selection screen built using WDR_SELEC_OPTIO

    Hi All,
    I have created a selection screen as below
    lr_field = wd_this->m_handler->create_range_table( 'YFMTFLOW' ).
    *  ASSIGN lr_field->* TO <fs_range>.
    *  ls_date-sign   = 'I'.
    *  ls_date-option = 'EQ'.
    *  ls_date-low    = 'US'.
    *  APPEND ls_date TO <fs_range>.
    * Add the select-option to the group
      wd_this->m_handler->add_selection_field(
        i_id           = 'FLOW'
        i_within_block = 'PROC'
        i_no_intervals = abap_true
        it_result      = lr_field ).
    If i enter some value  and click a button to retireve the values as below
    DATA
        lt_sel_item TYPE if_wd_select_options=>tt_selection_screen_item.
    types: ty_flow type range of yfmtflow.
      FIELD-SYMBOLS:
        <fs_sel_item> LIKE LINE OF lt_sel_item,
        <fs_process>   TYPE yfmtprocess,
        <fs_flow>   TYPE ty_flow.
    * Get the selection-screen items
      l_handler->get_selection_screen_items(
        IMPORTING et_selection_screen_items = lt_sel_item ).
    * Retrieve the values from the select-options items
      LOOP AT lt_sel_item ASSIGNING <fs_sel_item>.
        CASE <fs_sel_item>-m_id.
          WHEN `PROCESS`.
            ASSIGN <fs_sel_item>-m_value->* TO <fs_process>.
          WHEN 'FLOW'.
            ASSIGN <fs_sel_item>-mt_range_table->* TO <fs_flow>.
        ENDCASE.
      ENDLOOP.
    <fs_flow> is empty
    but after I enter value and then press enter and then click the button to retrieve the values I am able to get low value <fs_flow> not the sign and option
    Is it the standard functionality ,if yes how can we overcome
    Thanks
    Bala Duvvuri

    Am giving clear coding of select options.
    nOTE: S_CARR_ID IS THE DATA ELEMENT OF CARR ID  FIELD,
    FOR THAT I AM APPLYING SELECT OPTIONS IN BELOW CODING.
    WRITE THE BELOW CODE IN WDDOINT( ) METHOD OF
    REQUIRED VIEW
    Data: lt_range_table type ref to data,
         read_only type abap_bool.
    WD_THIS->M_WD_SELECT_OPTIONS = WD_THIS-
    >WD_CPIFC_SELECT_OPTIONS( ).
    WD_THIS->M_HANDLER = WD_THIS->M_WD_SELECT_OPTIONS-
    >INIT_SELECT_SCREEN( ).
    WD_THIS->M_HANDLER->SET_GLOBAL_OPTIONS(
         I_DISPLAY_BTN_CANCEL = ABAP_FALSE
         I_DISPLAY_BTN_CHECK = ABAP_FALSE
         I_DISPLAY_BTN_RESET = ABAP_FALSE
         I_DISPLAY_BTN_EXECUTE = ABAP_FALSE ).
    LT_RANGE_TABLE = WD_THIS->M_HANDLER-
    >CREATE_RANGE_TABLE( I_TYPENAME = 'S_CARR_ID' ).
    WD_THIS->M_HANDLER->ADD_SELECTION_FIELD(
              I_ID = 'S_CARR_ID'
              IT_RESULT = LT_RANGE_TABLE
              I_READ_ONLY = READ_ONLY ).
    BELOW CODE IN REQUIRED ACTION( SAY IN SOME BUTTON
    ACTION WHICH WILL RETRIEVE THE DATA FROM DATABASE TABLE
    USING SELECTI OPTIONS VALUES)
    fIRST THE GET REFERENCE TO NODE( CTRL F7--->READ
    CONTEXTB---FLIGHT NODE )
    ***THEN BELOW CODE
    DATA: RT_CARRID TYPE REF TO DATA.
    DATA:IS_FLIGHT TYPE TABLE OF SFLIGHT.
    FIELD_SYMBOLS: <FS_CARRID> TYPE TABLE.
    RT_CARRID = WD_THIS-> M_HANDLER-
    >GET_RANGE_TABLE_OF_SEL_FIELD( I_ID = 'S_CARR_ID' ).
    ASSIGN RT_CARRID-> TO <FS_CARRID>.*
    SELECT * INTO CORRRESPONDING FIELDS OF TABLE IS_FLIGHT
       FROM SFLIGHT WHERE CARRID IN <FS_CARRID>
    NODE_FLIGHT->BIND_TABLE( IS_FLIGHT ).

  • How to display a value from Select List by default

    I have a Select List on a form and I need to on page load show an entry from the SL depending on the user Id of the user logged on.  For example, if the SL had 3 entries: 'Div1', 'Div2', and 'Div3', depending on the division the user belongs to (I can determine that from his user Id using a SQL), say, I need to display 'Div2' to the user in the SL instead of the usual NULL or '---- Select Div ----'.  'Div1' and 'Div 3' entries will still be part of the SL, but for user's convenience I need to display their division.
    Any ideas?
    Thanks,

    Hi Ajay,
    you need to specify your apex version, database version and so on to make our help specific.
    Anyhow you can create a page process- for example one at On Load before header.
    For example;
    [code]
    declare
      v_division varchar2(32);
    begin
      --select default division
       select my_division
       into v_division
      from my_division
      where my_division=:APP_USER;
    :P_DIVISION:=v_division;
    end;
    [/code]
    Then in the default of your select list, specify P_DIVISION as the default. Using one of several methods
    Understanding Page-Level Items
    Kofi

  • Get values from selected row in a Table?

    Hello.
    I'm on VC 7.1 (the trial version downloaded from SDN).
    I'm trying to figure out a way to retrieve some values from the currently selected row in a Table element through the output connector.
    I have a web-service which returns results to the Table, and I want the user to be able to select one of the rows and then trigger another web-service call with some of the values from that row -- is this possible?
    Also, I can't find any documentation that lists what can and can't be done with each UI element, is there something like this some where? (the Modeler's guide doesn't help, and the Reference guide seems to focus on menu items and what the VC screen looks like)
    Thanks,
    Alon

    Hi Alon
    This is a very simple task.
    You just need drag the service which you want to execute, after select row, in model.
    Drag output connector from table to input connector of service. Then map the parameter.
    Regards
    Marcos

  • Getting values from select option

    Hi,
    I have a requirement where the user is going to pass values in select-option  in low and high. lets say s_bwart(movement types).
    now i have to fetch this bwart values into an internal table.
    my internal table will be having only one field that is bwart. so how do i populate my internal table with those values. could any body help me in this.
    Thanks in advance
    neha

    Hi, when using SELECT-OPTIONS, use can pretty much do any kind of selection he wants, including ranges, and excluding values, so the best way to handle it is to select from the data base when the user executes the report.  for example.
    data: begin of ibwart occurs 0,
          bwart type mseg-bwart,
          end of ibwart.
    select-options: s_Bwart for mseg-bwart.
    start-of-selection.
    select bwart into table ibwart
               from <b>T156</b>
                     where bwart in s_bwart.
    Regards,
    Rich Heilman

  • 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

  • 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!

  • Get data from two list simultaneously using REST

    Is it possible to query two list in the same time?
    url: http://sites.com/url/_api/web/lists/GetByTitle(‘List1')
    url: http://sites.com/url/_api/web/lists/GetByTitle(‘List1' and 'List2')
    Thanks in advance

    Hi ,
    By default SharePoint doesn't provide this kind of rest service or server object model api to retrieve the specified multiple lists once, it could only get all lists or one specified list one time.
    you may query twice to get two lists as a workaround.
    http://msdn.microsoft.com/en-us/library/office/fp142380(v=office.15).aspx
    http://msdn.microsoft.com/en-us/library/jj246453.aspx
    Thanks
    Daniel Yang
    TechNet Community Support

  • How to get a value from  select one choice (created by static view)

    Hi,
    Whene ever Iam trying to get value from select one choice which is created by static view iam getting only index.How to get the actual value in 11g .please help me anybody .Thanx in advance....
    Edited by: 874530 on Jul 22, 2011 11:05 PM

    Thnax for your quick reply..
    Iam using 11.1.1.3.0 version.
    My code is
    <af:selectOneChoice value="#{bindings.DenialLevel.inputValue}"
    label="#{bindings.DenialLevel.label}"
    required="#{bindings.DenialLevel.hints.mandatory}"
    shortDesc="#{bindings.DenialLevel.hints.tooltip}"
    id="soc2"
    valuePassThru="true"
    binding="#{backing_denialcomment.denialLevelList}">
    <f:selectItems value="#{bindings.DenialLevel.items}" id="si6"/>
    </af:selectOneChoice>
    and in bean am not able to get value of attribute .Iam getting only index...

  • Getting multiple values from a list box

    Hi,
    I am not able to get multiple selected values from a list box using the getParameterValues(). I used the following code..
    String[] names=request.getParameterValues("lname");
    can anyone tell me what the error is or is there any other way i can get multiple selected values from a list box.
    Thanks
    Satish

    Fragment 1
    This is the JSP Code am using for testing
    <%
    String[] name =request.getParameterValues("D1");
    if(name.length==1)
    String value=name[0];
    Instead of name.lenght==1 try with name!=null
    Fragment 2
    out.println(value);
    replace the above fragment with
    %>
       <%-- print result -->
       <%=name[0]%>
    <%
    Fragment 3
    else
    %>
    The list box D1 is a multiple select list box.
    If it still doesn't work, check that the checkboxes have the same name as well as different values
    <input type="checkbox" name="D1" value="1">
    <input type="checkbox" name="D1" value="2">I hope this helps :-)
    Good luck
    touco
    ps: i want duke

  • How to get selected values from Select Many Choice List

    Hello All -
    I am using Select Many Choice List and wish to get the selected values in the bean. I have created method binding for valueChangeListener for the choice list, but not sure how to get the selected values.
    I am facing problem in getting values from valueChangeEvent.getNewValue(). For Select One Choice List this returns int, but some list type object for Select Many Choice List.
    When I try to print the value it comes something like:
    ArrayList newVal = new ArrayList(Arrays.asList(valueChangeEvent.getNewValue()));
    System.out.println(newVal);
    [Ljava.lang.Integer;@870ad8
    Could anyone please suggest how to type cast and use the return of valueChangeEvent.getNewValue() to get the selected values.
    Regards -
    Rohit

    Hi Timo -
    Thanks for the suggestion. I could get the values as below:
    public void multiOpUnitValChange(ValueChangeEvent valueChangeEvent) {
    // Add event code here...
    BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding opUnitIter = (DCIteratorBinding)bindings.get("OperatingUnit2VOIterator");
    Integer[] values = (Integer[])valueChangeEvent.getNewValue();
    for (int i=0; i<values.length; i++){
    Row row = opUnitIter.getRowAtRangeIndex(i);
    System.out.println(row.getAttribute("OpUnitId"));
    Thanks -
    Rohit

  • How to get multiple values from the list

    I've a list of an item which I queried it from the database. I also created a button that will takes a selected items from the list when it was clicked. I used javabean to get the data from database.
    <%     // clicked on Select District Button
    Vector vselectedDistrict = new Vector();
    Vector vdistrictID = new Vector();
    String tmpSelectDistrict = "";
    tmpSelectDistrict = request.getParameter("bSelectDistrict");
    if(tmpSelectDistrict != null)
         // get multiple values from the list
         String[] selectedDistrict = request.getParameterValues("usrTDistrict");
         vselectedDistrict.clear();
         vdistrictID.clear();
         if((selectedDistrict != null) && (selectedDistrict.length != 0))
                             for(int i=0;i<selectedDistrict.length;i++)
                   vselectedDistrict.addElement(selectedDistrict);           
              vdistrictID = dbaseInfo.getcurrentDistrictID(nstate,vselectedDistrict);
              for(int i=0;i<vdistrictID.size();i++)
                   out.println("district = " + selectedDistrict[i]);                         out.println("district ID= " + vdistrictID.get(i).toString());
    %>
    // get vdistrict from the database here......
    <select name="usrTDistrict" size="5" multiple>
    <%     for(int i = 0; i< vdistrict.size(); i++)
    %>
         <option value="<%=vdistrict.get(i).toString()%>"><%=vdistrict.get(i).toString()%></option>
    <%
    %>          
    </select>
    <input type="submit" name="bSelectDistrict" value="Select District">
    Lets say the item that i selected from the list is 'Xplace' and I clicked on the Select District button,
    what I got is this error message:
    org.apache.jasper.JasperException: Unable to convert string 'Xplace' to class java.util.Vector for attribute usrTDistrict: java.lang.IllegalArgumentException: Property Editor not registered with the PropertyEditorManager
    So where is going wrong and what the message means?. Any help very much appreciated. Thanks

    These are just guesses that might hopefully steer you in directions you haven't looked in yet.
    I presume you used triangle brackets (< >) to avoid having the Jive Forum think it was the "italics" tag?
    Are you certain this: dbaseInfo.getcurrentDistrictID(nstate,vselectedDistrict);
    expects a Vector as its second parameter? And returns a Vector?
    I don't believe you've shown how you use the javabean, or its code? Perhaps it should be rewritten to accept an array of strings instead of a Vector?

Maybe you are looking for