3 select Box and 2 dynamic one

Hi guys,
I have 3 select box.
First one will change the second one values, and second one will change third one values
So Im doing this :
<h:selectOneMenu style="width:320px;" value="#{class.info1}"
                         valueChangeListener="#{class.changeInfo2}"
                         id="info1Id"
                         onchange="enableDisableElements(\'#{rich:clientId('info2Id')}\')">
            <f:selectItem itemLabel="#{messages.IRS_PageBlock1Select1}" itemValue="-1"/>
            <f:selectItems value="#{class.getListInfo1()}"/>
            <a:support event="onchange" reRender="#{rich:clientId('info2Id')}"/>
        </h:selectOneMenu>
<h:selectOneMenu style="width:320px;" value="#{class.info2}"
                         id="info2Id" required="true" styleClass="disabledTrigger"
                         valueChangeListener="#{class.changeInfo3}"
                         onchange="enableDisableElements(\'#{rich:clientId('info3Id')}\')">
            <f:selectItem itemLabel="#{messages.IRS_PageBlock1Select2}" itemValue="-1"/>
            <f:selectItems value="#{info2List}"/>
            <a:support event="onchange" reRender="#{rich:clientId('info3Id')}"/>
        </h:selectOneMenu>
<h:selectOneMenu style="width:320px;" value="#{class.info3}"
                         id="info3Id" required="true" styleClass="disabledTrigger">
            <f:selectItem itemLabel="#{messages.IRS_PageBlock1Select3}" itemValue="-1"/>
            <f:selectItems value="#{info3List}"/>
        </h:selectOneMenu>in Java :
public void changeInfo2(ValueChangeEvent e) {
        newinfo2Id = (Long) e.getNewValue();
        callMethodToUpdateInfo2List();
    public void changeInfo3(ValueChangeEvent e) {
        newinfo3Id = (Long) e.getNewValue();
        callMethodToUpdateInfo3List();
    }callMethodToUpdateInfo2List and callMethodToUpdateInfo3List are methods returning List<SelectItem>
So when I arrive on my page, select first drop down, second drop down is well updated, but then if I try to change some values in this one I get :
Caused by java.util.NoSuchElementException with message: ""
javax.faces.component.SelectItemsIterator.next(SelectItemsIterator.java:117)
javax.faces.component.SelectItemsIterator.next(SelectItemsIterator.java:144)
javax.faces.component.SelectItemsIterator.next(SelectItemsIterator.java:49)
javax.faces.component.UISelectOne.matchValue(UISelectOne.java:164)
javax.faces.component.UISelectOne.validateValue(UISelectOne.java:137)
javax.faces.component.UIInput.validate(UIInput.java:867)
javax.faces.component.UIInput.executeValidate(UIInput.java:1065)
javax.faces.component.UIInput.processValidators(UIInput.java:666)
javax.faces.component.UIForm.processValidators(UIForm.java:229)Is it because the render of the component is bad updated ?? or something like that ?
Thx guys
Edited by: xtof83 on Jun 12, 2008 8:03 AM

You may find this article useful: [http://balusc.blogspot.com/2007/10/populate-child-menus.html].

Similar Messages

  • One select box and another one

    I have this page:
    http://apex.oracle.com/pls/otn/f?p=35882:1:2673208312256457
    I want that a report title will show the current table selected, but after changing the schema, the title still has the previous table name.
    How can change this behavior?

    Hi,
    OK - I've made a few changes to the page
    1 - Firstly, as you are using ALL_TABLES for the first list and as this is a particularly slow table that would need to be re-read every time the page loads, I've created a collection and populated this with the data instead only on the first page load (see process P1_CREATE_COLLECTION). The first list reads data from the collection instead. The dramactically speeds up the page reloads
    2 - As the value of P1_SELECT2 won't change until a new value is selected for it, I've added a process (P1_SELECT2_RESET) that resets the value of the list to "X" (see below). This is conditional on a request value of P1_SELECT1 (which is the name of the first list). This is required as P1_SELECT2 is still a valid value until the page is submitted for the second time as Apex will attempt to set the list's selected value to P1_SELECT2, not finding it and then selecting the first value by default. When the page is next submitted, this becomes the value of P1_SELECT2 but until then, the value is still the value stored in the session.
    3 - I've set both lists to use NULL values of "X" and set their defaults to this using computations.
    4 - Finally, I've added scrollbars to the report as it was fairly wide and was making it difficult to see the lists once the report showed any data
    Andy

  • How can a classic report be filtered using one select item and dynamic action?

    APEX 4.2.1
    DB 11g
    I have a page with 4 reports on it.  The top report is an interactive report and the following 3 are classic reports.  The users would like to be able to use a select list to filter the 3rd report by PO line number without refreshing the entire page.
    After verifying that the report is set to allow partial refreshes, I took the following steps
    1.  Created a PO Line select item (p_po_line_select) in the same report region
    2.  Added p_po_line_select to the report query
    3.  Created a dynamic action on p_po_line_select with 2 true actions
         1.  Set value (p_po_line_select)
         2.  Refresh report region.
    The Set Value dynamic step was not working; I would get an out of memory error at line 2, memory stack error, or the value did not get saved to session state depending on the settings I selected.  I was able to get it working with the following set:
    1.  Action = Set Value
    2.  Set type = PL/SQL Expression
    3.  PL/SQL Expression = :p_field_does_not_exist
    4.   Page items to submit = blank
    5.  Selection Type = Item(s)
    6.  Item(s) = p_field_does_not_exist
    p_field_does_not_exist does not exist as a page or application item which leads me to believe that this is a bug and I am just lucky that it worked.  I would rather know how to do this properly.  Can someone please provide a link to a working example of how this should be done or state which settings are wrong?
    I was able to reproduce the issue in the following app
    http://apex.oracle.com/pls/apex/f?p=4500:1000
    workspace = occam
    user  test/apex1
    Thanks,

    STOP POSTING DUPLICATE THREADS.
    If you have additional information, continue the discussion by posting it as a follow-up on the original thread: What is the proper way to filter classic report using just an LOV select field with dynamic action?

  • TableSelectMany selects only and only one item !!!

    this is my table source ...
    i select multiple items.but in back_bean code .set return only one item.
    <af:table value="#{bindings.GenfunctionsView1.collectionModel}"
    var="row" rows="#{bindings.GenfunctionsView1.rangeSize}"
    first="#{bindings.GenfunctionsView1.rangeStart}"
    emptyText="#{bindings.GenfunctionsView1.viewable ? 'No rows yet.' : 'Access Denied.'}"
    binding="#{backing_ManySelection.table1}" id="table1"
    banding="none">
    <af:column sortProperty="Id" sortable="false"
    headerText="#{bindings.GenfunctionsView1.labels.Id}"
    binding="#{backing_ManySelection.column1}" id="column1">
    <af:inputText value="#{row.Id}"
    required="#{bindings.GenfunctionsView1.attrDefs.Id.mandatory}"
    columns="#{bindings.GenfunctionsView1.attrHints.Id.displayWidth}"
    binding="#{backing_ManySelection.inputText1}"
    id="inputText1">
    <f:convertNumber groupingUsed="false"
    pattern="#{bindings.GenfunctionsView1.formats.Id}"/>
    </af:inputText>
    </af:column>
    <af:column sortProperty="Functionname" sortable="false"
    headerText="#{bindings.GenfunctionsView1.labels.Functionname}"
    binding="#{backing_ManySelection.column2}" id="column2">
    <af:inputText value="#{row.Functionname}" simple="true"
    required="#{bindings.GenfunctionsView1.attrDefs.Functionname.mandatory}"
    columns="#{bindings.GenfunctionsView1.attrHints.Functionname.displayWidth}"
    binding="#{backing_ManySelection.inputText2}"
    id="inputText2"/>
    </af:column>
    <af:column sortProperty="Functionformula" sortable="false"
    headerText="#{bindings.GenfunctionsView1.labels.Functionformula}"
    binding="#{backing_ManySelection.column3}" id="column3">
    <af:inputText value="#{row.Functionformula}" simple="true"
    required="#{bindings.GenfunctionsView1.attrDefs.Functionformula.mandatory}"
    columns="#{bindings.GenfunctionsView1.attrHints.Functionformula.displayWidth}"
    binding="#{backing_ManySelection.inputText3}"
    id="inputText3"/>
    </af:column>
    <f:facet name="selection">
    <af:tableSelectMany text="Select items and ..."
    binding="#{backing_ManySelection.tableSelectMany1}"
    id="tableSelectMany1" required="true">
    <af:commandButton text="commandButton 1"
    binding="#{backing_ManySelection.commandButton1}"
    id="commandButton1"
    action="#{backing_ManySelection.commandButton1_action}"
    immediate="true" partialSubmit="true"/>
    </af:tableSelectMany>
    </f:facet>
    </af:table>
    public String commandButton1_action() {
    // Add event code here...
    Set KeySet=null;
    KeySet=getTable1().getSelectionState().getKeySet();
    System.out.println("KeySet Rows="+KeySet.size());
    return null;
    plz help me!

    Hi,
    create a SelectionListener on the table to pint to the following method in a managed bean
    public void SelectionLister(SelectionEvent selectionEvent) {
    int selectedKeysSize = selectionEvent.getSelectedKeys().getSize();
    Frank

  • Comparison between new X1 box and old one

    Is the only difference between the new X1 box and the old one the ability to use the cloud technology?

    More tuners for recording stuff, apps, more storage, new menu, anyroom dvr (if you are in an SA area this wasn't available previously)  

  • Drop down box and Dynamic presence

    I hope this makes sense.
    I have a drop down box with several values in it. Based on the user's selection, different fields and subforms will either be visible or hidden. To do this, I built a switch statement on the exit event of the drop down box. The statement works great until I start introducing dynamic properties to one of the subforms.
    Two of the fields in one repeating subform need to be hidden or set back to visible depending on the choice in the drop down box. However, once you have added multiple instances of the subform, it only hides/displays the FIRST field in the subform. I need it to hide/display ALL of those fields when the subform is repeated.
    To do this, on the first selection, I created a for statement to go through all of the instances and set all of those fields to hidden or visible as needed. However, it's not working. At all. Even on the first instance like it used to.
    I hope I'm making sense. Here is the code I am using for my for statement:
    var indNum = xfa.resolveNodes("RequestDetails.RepeatingSection[*].serialNum");
    for (var i=0; i < indNum.length; i++) {
        xfa.form.form1.Page1.RequestDetails.RepeatingSection(i).serialNum.presence = "visible";
        xfa.form.form1.Page1.RequestDetails.RepeatingSection(i).requestedNum.presence = "hidden";

    Here is what I have found, and I hope it is helpful. Where did ["+i+"] come from? It came from my brain, I guess. Trying to figure out some way of making it work, when all of the documentation's syntax seemed not to work. Even all of the books I have on Livecycle said that a simple [i] would work; but it doesn't within the resolveNode. I figured if it wasn't resolving the variable i, then maybe I needed to separate it out.
    01371406, the only error I see with your form is a null error, which my form was doing do. I'm not entirely sure why it throws back null sometimes when it's done running through the loop; it should simply stop. Nonetheless, to fix it I simply integrated an if statement within my for loop to take care of it. An example of this from my code from earlier:
    var indNum = xfa.form.form1.Page1.RequestDetails.RepeatingSection.instanceManager.count;
    for (var i=0; i < indNum; i++) {
        if (xfa.resolveNode("RequestDetails.RepeatingSection["+i+"]") == null) {
              break;
        xfa.resolveNode("RequestDetails.RepeatingSection["+i+"]").serialNum.presence = "hidden";
        xfa.resolveNode("RequestDetails.RepeatingSection["+i+"]").requestedNum.presence = "hidden";
    Something else that I found while working on this same form, that might seem obvious to others but took me a while to figure out:
    I have a switch statement with 7-8 case statements. Within each case statement, I have two for loops. The first loop I had made used the variable i and it worked fine. However, when I introduced the second for loop, also using the variable i, it freaked out and stopped working. So I switched to another variable. (In addition, the letters h, w, x, y are reserved letters; you can't use them) After switching the variable, it worked fine. So I copied the loop into the next case statement. The form broke again. Apparently I could use a for statement with the variable i in multiple cases, but not any other variable? I literally had to go through the alphabet with the second for loop in each case. What a pain. I still don't know why it was throwing a fit like that.

  • Selection Box and some repeats in drop down menu problems, please help

    Hello,
    I'm not quite sure what i have managed to turn on but everytime i click anything on my mac it gets a black box around it... I have no idea how to turn it off... can someone help me?
    Also my restart, Log out and Shut down seem to be repeating themselves in my apple drop down menu... is the normal? I don't remember it before. I'm working on a Mac Pro using Mac OS X 10.4.7.
    Any help would be much appreciated.

    Ahh thank you so much!
    I don't know how I managed it but it was really annoying me and now its gone. Wonderful.
    Thank you again.

  • Autosuggest and select box

    I was wondering how to update a select box with data relevant
    to a selection made on a suggest box, something similar to
    this,
    but with a spry suggest box instead of the first select box on the
    example.
    I tried the example (two select boxes using two binded data
    sets) with my db and it works; when I select something on the first
    select box, the second one changes dynamically according to the
    selection made.
    I have defined two datasets:
    var ds1 = new
    Spry.Data.XMLDataSet("API/make_entry_list_xml.php","viperdb/entry",{sortOnLoad:"pdb_id",s ortOrderOnLoad:"ascending"});
    var ds2 = new
    Spry.Data.XMLDataSet("API/get_chains_for_entry_id.php?VDB={ds1::pdb_id}","viperdb/entry/c hain_id");
    and defined the suggest and select boxes as:
    <div id="suggest_1">
    <input type='text' id='vdb1'>
    <div id="resultsDIV_1" spry:region="ds1">
    <div spry:repeat="ds1" spry:suggest="{pdb_id}"
    onClick="ds1.setCurrentRowNumber(this.selectedIndex);"
    onchange="ds1.setCurrentRowNumber(this.selectedIndex);">
    <div class="suggest_list">{pdb_id}</div>
    </div>
    </div>
    <span spry:region="ds2" id="subdirSelector">
    <select spry:repeatchildren="ds2" name="subdirSelect">
    <option value="{chain_id}">{chain_id}</option>
    </select>
    </span>
    </div>
    Neither onclick nor onchange functions seem to work; on load
    the second select does fill up with ds2 data (acording to the first
    element of ds1), but when using the suggest box to select something
    different, the selectbox doesn't change accordingly, keeping always
    the same data.
    Am I using the setCurrentRowNumber in the wrong dataset or
    tag?

    I would say if you were to do somthing like this
    var ds1 = new
    Spry.Data.XMLDataSet("API/make_entry_list_xml.php","viperdb/entry",{sortOnLoad:"pdb_id",s ortOrderOnLoad:"ascending",useCache:false});
    see I added the useCache:false
    This will stop the browser from cacheing your xml, thenjust
    add an onclick to some function like say
    update();
    then have update do this
    function update()
    ds1.loadData();
    That should cause the browser to update the data set and
    update your elements now the only downside is IE has a bug well
    more like IE being the bug but anyhow you may have to add things to
    your code to get it to work right in IE, I added in some random
    number script in my JS so that it will append on the end of my DS
    each time so IE thinks its a new XML doc. Hope this helps.

  • Select boxes dependent on each other?

    Hi is there a way to use selectboxes / textfileds that depend on each other.
    select box 1. reads from database names
    select box 2. this one is filled when a chiose from box 1 is selected.
    (after a database question based on the result in box 1)
    inupttextfields 1 and 2 are filled after a new database request based on the choise in select box 2.
    pleased with different kind of answers. without javascripts adn also with use of
    javascripts. (Im not so used with javascripts)
    Plese give me a simple example and not just a link.
    thanks.

    Plese give me a simple example and not just a link.There is no simple example, because this is highly specific on your webpage implementation and database. search google for "javascript dynamic select box", or "javascript dynamic option lists". That should give you some examples.

  • Can I parse Text files in Java Script to populate in select boxes.

    The scenario is as follows:
    I have two select boxes, the second one depends on the first one for its values.
    Values corresponding to the selection made in the first select box are available in a text file.
    Can I parse the text file to fill in the values in the second select box through javascript?
    Can any one please help.
    Thanks,
    Ramesh

    This isn't a javascript forum. Java is not Javascript and Javascript is not Java.
    If you actually meant Java...the answer is "maybe, depending on what you're doing".

  • Move data from a select box to table in database.

    Hi,
    a. I have one dual selection box and for that the is div id =' id '
    b.In dual selection box there is two box ie. one is Available and other is Selected. So a user can select one or all using two button.
    c. My requirements is like :
    onclick of a radio button all datas from available side will move to database and that dual box will be hidden.

    Java != Javascript. Please go to some web development board.

  • About Select boxes

    I have two select boxes
    one is State : which contains list of states and the Second is City
    Now basing on the condition of Value in State select box i should retreive the correponding cities of that state from the database and fill the second select box
    can any one help me

    Hi,
    Add an action listener on the state list box. On select handle the event and get the selected value. Fetch your required list and populate the city list box. You may also retain the selected value in the first list box as that will help you highlight the selection while you are refreshing all the data.
    If you get the idea just go and you shall find it all in the link http://java.sun.com/docs/books/tutorial/uiswing/events/
    Hope this helps
    Aviroop

  • Multiple selection box

    is there a way to use a multiple selection box and calculate values in a text box.
    I did set up a rule to set values but I won't work for my need.
    so multiple selection box has pc1, pc2, pc 3. The user can select all of these or just one but no matter what selection is made the price is calculated into another box on the InfoPath form, I assume either a text box or a calculated field box?
    any help or guidance would be greatly appreciated!!
    Ray

    Hi Little_Ghost,
    for using a form, seems quite a challenge.
    when you select the selection box, or check boxes in the form, you may need to grab the all the selection, and refresh the page with the pre-selected information, so it will be loaded when the page is refreshed.
    if you are using infopath template, it may be difficult, since we need 2 infopath form templates associate with list A and B individually, not sure how to interact this cross 2 infopath form template.
    my infopath colleague suggest you to try to use one infopath form template with 2 data connections.
    i was thinking,
    if you could populate the items, for example by using getlistitem()
    http://spservices.codeplex.com/wikipage?title=GetListItems
    then you may put the result in an array, and ready to compare.
    since you would like to use a form, then it may not updated directly, i am not quite sure for this, because as i know you may need to use a button to send out and update/refresh the fields.
    http://www.quirksmode.org/js/forms.html
    http://www.javaworld.com/article/2077176/scripting-jvm-languages/using-javascript-and-forms.html
    or you may have to try to use the data view webpart:
    http://www.dotnetcurry.com/showarticle.aspx?ID=581
    Regards,
    Aries
    Microsoft Online Community Support
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

  • Need help with moving items betwen 2 netui select boxes

    Hi,
    I have 2 multiple select boxes for possible courses and assigned courses. I need a way to implement move of option items from one box to another using buttons. The user can select courses from one box and move them to another. I am not sure how I would do that with netui select boxes and a pageflow method. If I use javascript, i get all kinds of errors even though I am trying to use the tagid. If validation fails, then the select boxes dont save the updated content.
    Please help.
    Bindu

    Ahmed_Arafa wrote:
    hii all,
    i have a list item.. in this list item i have a two list item value
    1- visa ,list elements visa
    2- cash ,list elements cash
    i need when user select visa from list item then appear text item (visa_number)
    i change item visa_number visible to no
    that's my code i write it
    trigger
    when new-block-instance
    IF :RESERVATION.PAY_METHOD = 'visa'THEN
         SET_ITEM_PROPERTY('RESERVATION.VISA_NUMBER',VISIBLE,PROPERTY_TRUE);
    ELSE
    SET_ITEM_PROPERTY('RESERVATION.VISA_NUMBER',VISIBLE,PROPERTY_FALSE);     
    END IF;**My problem is when i click on cash in the first nothing happen and this right
    when i click to visa second nothing happen this not right
    **when i click on visa first every thing is working
    i need when i click on visa any time item appear and when i would like to click to cash.. visa item is disappearWrite your code in When-List-Change trigger at list_item.
    Hope this will help you.

  • Multiple selection box + Substracting cascading dropdown list

    I have a multi-select boxe and a drop down but instead of ADDING the choices made in the multi select box to the list of selectable items in the drop down list, I want to SUBSTRACT them.
    I'll try to clearify it: if in the multi-slection box you have:
    Option A and option B and
    in the drop down list, you (depending on you selection) have 2 4 6 8 (options for A) or 4 8 10 12 (options for B).
    When selecting BOTH A and B, the drop down liast should ONLY display the values that overlap/exist in both A and B (e.g 4 8).
    This would have to work for X number of options in both the multi select box and the drop down list.
    Doess anybody know how to make that work?
    Thanks in advanced and kind regards!

    Hi Little_Ghost,
    for using a form, seems quite a challenge.
    when you select the selection box, or check boxes in the form, you may need to grab the all the selection, and refresh the page with the pre-selected information, so it will be loaded when the page is refreshed.
    if you are using infopath template, it may be difficult, since we need 2 infopath form templates associate with list A and B individually, not sure how to interact this cross 2 infopath form template.
    my infopath colleague suggest you to try to use one infopath form template with 2 data connections.
    i was thinking,
    if you could populate the items, for example by using getlistitem()
    http://spservices.codeplex.com/wikipage?title=GetListItems
    then you may put the result in an array, and ready to compare.
    since you would like to use a form, then it may not updated directly, i am not quite sure for this, because as i know you may need to use a button to send out and update/refresh the fields.
    http://www.quirksmode.org/js/forms.html
    http://www.javaworld.com/article/2077176/scripting-jvm-languages/using-javascript-and-forms.html
    or you may have to try to use the data view webpart:
    http://www.dotnetcurry.com/showarticle.aspx?ID=581
    Regards,
    Aries
    Microsoft Online Community Support
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

Maybe you are looking for