Dependent selectOneChoice

Hi,
I have a table called Parish with attributes ParishId, CountryId, CityId and AreaId.
i have created a custom method in my application module for creating records with parameters the table parameters.
I build the dependent selectOneChoices using normal selectOneChoice and partial triggers. When the Country is changed, then in a bean i set the where clause of the view bind variable and execute the query to bring up the result and so on.
Everything works fine (by the way i am in the create process). When i test this situation, something goes wrong. I open my form and without entering any data i click submit which calls my method in the Application Module and tries to set the values and commit. Errors appear for all fields as they are mandatory. This is fine. I click cancel (which redirects my to my main page) and the click again create to direct me to my create form.
I fill in all the fields and when i click save, i get an error that the city is is missing (null) which is not null. I have selected a value.
Did anyone face any similar problems?
Thanks
Antonis

Please note that when creating the Area (which consists of CountryId, CityId and Area Name) this does not occur.
Thanks

Similar Messages

  • Dependent selectonechoice validation problem

    I have in my page two dependent selectonechoice's, the first of countries an second of states. States has a not null validation. First time two selectonechoice's starts with a blank item first, nothing selected, the problem is when I select a country the selectonechoice of states execute the validation before filters the states and I never can't select states. Sorry for my english....

    Or use empty values in lov, then validation won't trigger on client side.

  • Dependent Selectonechoice boxes error

    Hi All,
    I am using jdeveloper 11g.
    I have two dependent dropdown boxes (Category and services).
    Everytime i change the category, the services dropdown needs to be refreshed.
    I am not using any view objects.
    The dropdowns are working fine (that is when i change the category, services do get refreshed), but lets say i select a category "A"
    and then select a service "serviceA" then go back to category and change that to "B", it refreshes the services dropdown
    but adds an empty row above "select service" option.
    and logs show the following error
    <SimpleSelectOneRenderer><_getSelectedIndex> Could not find selected item matching value "2,Satisfaction Survey"
    in RichSelectOneChoice[UIXEditableFacesBeanImpl, id=soc4]Following is the code for the dropdown menus
    <af:selectOneChoice label="Report Category"
                binding="#{backing_RequestForm.soc3}"
                 id="soc3" valueChangeListener="#{backing_RequestForm.loadServiceList}"
    autoSubmit="true" required="true" immediate="true">
                <f:selectItems value="#{backing_RequestForm.reportCategoryList}"
                                id="si26"/>
              </af:selectOneChoice>
                <af:selectOneChoice label="Service"
                                  binding="#{backing_RequestForm.soc4}"
                                  id="soc4" partialTriggers="soc3" autoSubmit="true"
    required="true" immediate="true">
                <f:selectItems value="#{backing_RequestForm.serviceListFinal}"
                                id="si27"/>
              </af:selectOneChoice>i tried the above code removing immediate, requried attributes, yet in the logs i get the same error.
    Any idea on what i could be missing ??
    Thanks
    ash

    Hi,
    What difficulty are you facing exactly.
    Is your depended dropdown fetching values correctly??
    My problem was that when i select a value in dropdown A and a value is dropdown B, then go back and change the value of A, the values in B got refreshed but added an extra blank entry in the dropdown and also in the logs shows the following error
    SimpleSelectOneRenderer><_getSelectedIndex> Could not find selected item matching value "2,Satisfaction Survey" in RichSelectOneChoice[UIXEditableFacesBeanImp
    Is this the problem you are facing??
    If so, in valuechangelisterner method, i added the code for the resetting the selectonechoicebox.
        if(event.getNewValue().equals("") || event.getNewValue() == "" || event.getNewValue() == null || event.getNewValue().equals(null) ){
       // reset the drop down to avoid <SimpleSelectOneRenderer><_getSelectedIndex> Could not find selected  error  
    // soc3 and soc4 are the ids of selectonechoice component
          soc3.resetValue();
          soc4.resetValue();
          serviceListFinal = new ArrayList<SelectItem>();
         this.serviceListFinal.add(new SelectItem("","Select service"));
    else{
    soc4.resetValue();
      String catDesc = event.getNewValue().toString();
      // code for populating the dependent dropdown
       }Hope this helps
    ash

  • Validation problem with dependent selectOneChoice

    Hi,
    I have two af:selectOneChoice box. Both have valueChangeListener. 1st box will load the value in 2nd box and the 2nd box listener has some logic for rendering other component. Required and immediate attribute are true for both the box.
    Now if I change the 1st box then automatically 2nd box "required" validation gets executed, ideally it should happen when I will click the submit button.
    Plz help.

    I am going to Lov from a multi line table Inv Lines to get the current row. and then set where clause based on that.
    I also have another requirement to set where clause based on the columns that are not set as criteria.
    It is like, it is not mandatory to enter two base page columns, but if entered I need to consider in filter my Lov rows.

  • Issue with dependent selectOneChoice

    I have 1 selectOneChoice and 1 table
    I want When i choose value from selectOneChoice then table value change
    please help me
    thanks

    Hi User,
    Welcome to OTN!
    Please go through the following before you post your queries on this forum.
    https://forums.oracle.com/forums/ann.jspa?annID=56

  • 2 or more cascading selectonechoice in Oracle ADF 11g Rel 2

    Hi,
    I want to have 2 (later more) cascading (depending) selectonechoice component.
    The first combobox (partners) will be filled with the result of a SQL view object (PartnerLovView) execution, this query has NO (bind) parameter and only has one primary key as id and a name column (SELECT partnerId, partnerName FROM Partner ORDER BY partnerName).
    The second combobox (partner sites) has empty default value. This combobox will be filled with the result of a SQL view object (PartnerSiteLovView) execution, this query HAS a parameter (p_partnerId) and has one primary key as id, one foreign key for partner (partnerId) and a name column (SELECT partnerSiteId, partnerId, partnerSiteName FROM PartnerSite WHERE partnerId = :p_partnerId ORDER BY partnerSiteName).
    I can't achieve to bind the two comboboxes. I've dropped from the AppModuleDataControl the PartnerLovView1 to the JSF page as "Single Selection --> ADF Select One Choice... and also dropped the PartnerSiteLovView1 as same (this combo depends on the first combo selected value).
    In this case I get error something like: IN, OUT parameter missing, what is true because select need the parameter value. But how to bind it?
    I've set the autoSubmit to true for the first combo and partialTrigger property to the first combo id of the second combo.
    If a modify the (depending) second SQL and removed the paramter from base query and added a view criteria, this combo will filled but no reaction if I submit the first combo.
    How and where to bind the first combo selected value to the second combo?

    Hi Shay,
    thank You for your answer.
    The first solution doesn't meet my use case: I have two (later more for addinitonal) separate queries. No join.
    Second solution: can You give me some concrete source code? In the valuechangeListener I always got the label of the selected value not the real value (id). I've followed Your code with [getting value|https://blogs.oracle.com/shay/entry/getting_the_value_from_a_selec].
    Later I will be use more dependent comboboxes, this combos will prefilter a tree, and the tree will prefilter a table. Please send me (throw email) your contact too, because I need somebody who can help me, and maybe I send you my project use cases.
    Thanks
    Bye

  • Can't add a blank row entry on to a navigation list  dependable listbox

    Hi All
    Need some help please!
    I am trying to build two dependable selectOnechoice list boxes. i adopt Frank's method and built the top level list box as navigation list.
    my problem is I can't set a unselectedlabel property for this top level list box. I tried to set a the unselectedlabel property in page definition, but when the page rendered , the list has always got one row selected as default, instead of a blank row.
    Is there anyway that I can fix this?
    Thanks a lot

    Hi,
    this is because a navigation list is based on an iterator and the iterator always has a selected row.
    Frank

  • ADF table with select onechoice

    Hi,my scenario is:
    I have adf form and adf table on jspx page by vo(A).In table here there is need for select one choice populated from another vo(B).
    To acheive this i have created a transien attribue in vo(A) and bind to vo(B ) as select one choice.
    Now on value selected in selected one choice of adf table i want to filter value in another select one choice which is part of adf form on page.
    Please help me out.
    Thanks

    Hi,
    As I understand your requirement is how to build dependent LOV/selectOneChoice in ADF.
    Check this http://www.google.co.in/search?q=dependent+selectOneChoice+%2B+adf&btnG=Search&hl=en&source=hp&gbv=2&gs_sm=e&gs_upl=5656l8531l0l8687l10l9l0l2l0l0l360l1549l2-1.4l5l0&safe=active&oq=dependent+selectOneChoice+%2B+adf&aq=f&aqi=&aql=
    ~Abhijit

  • ADF viewScope is creating new instance without navigating away from view

    Hello,
    I'm using JDeveloper version 11.1.1.6.0.
    In a Portal application, I'm using view scoped Managed Beans. When I navigate to a page, as expected one instance of the Bean is created. I have dependent selectOneChoice objects inside this page, therefore a partial page refresh is generated when the user chooses a value, a value change listener is called, I read bean variables and do my thing. But here's the catch, a new instance of the Managed Bean is created before the value change listener is called. I have no idea why. According to documentation the viewScope bean should persist until the viewId changes. The end result is I'm screwed trying to read variables that should persist from page load inside this value change listener.
    But wait, that's not all. The issue here is the very first partial page refresh (or whatever it should be called). Only the first partial page refresh will cause the creation of a new managed bean instance. Any subsequent ones will not.
    So it goes like this:
    Page load -> @PostConstruct runs once -> Partial page refresh -> @PostConstruct runs again -> Partial page refresh -> @PostConstruct doesn't run -> Partial page refresh -> @PostConstruct doesn't run...
    I'm really at a loss of options here, the @PostConstruct running twice inside the very same view in a viewScope Bean is news to me. But then again, I'm new to ADF so what do I know. I noticed this happens with every viewScope bean in my application, not just this particular one. It just so happens that only in this case this became a problem.
    I'm in an all out war against this thing for more than a day now. The internet is my last resort before I make some dumb workaround that will consume me in my sleep. Any help is greatly appreciated.
    Edited by: 934172 on Sep 6, 2012 12:35 PM
    Edited by: 934172 on Sep 6, 2012 12:36 PM

    I'm determined to fix this thing no matter what the hell it takes.
    I found out exactly what is happening, even though I'm not sure why it happens. But the important question here is how to fix it.
    Here is the first request, the one that happens when I navigate to the page:
    http://localhost:7101/teste-Portal-context-root/faces/pages_test?_adf.ctrl-state=18hjxv8lyw_4Here are all the subsequent ones, the ones that happen when I select a choice:
    http://localhost:7101/teste-Portal-context-root/faces/oracle/webcenter/portalapp/pages/test.jspx?_adf.ctrl-state=18hjxv8lyw_4It's no wonder the server is confused and creates a new bean instance. Now what the hell? Why are they different? But more importantly, can I fix the first one? Can I force the bean created by the first one to answer for the second one?
    I still don't know. But hopefully I'll find out.

  • [SOLVED] Autosubmit, ValueChangeListener & DB PKs

    Hi there,
    I have a creation page, with some components having their (Autosubmit) property to (True), applying some actions with (ValueChangeListener) property. The problem is that when autosubmit fires, it looks like it reserves a row in the DB (without) commit, so when I finish entering all data and trying to save record, i face an error that the primary key is already defined (too many objects for the primary key), and if I try to modify its value to another one, then I errors dissappear, but with two records saved in the DB.
    So?
    Message was edited by:
    RJundi

    Ok, i have already compared the inserted values with the DB, and there is no problem.
    The page contains a set of dependent selectOneChoice elements with autosubmit euals to true and valueChangeListener retrieves Parameters (values) of each to re-populate the below selectOneChoice elements.
    I figured out to stop the Validation messages for required fields, but the problem is that when trying to save, it raises an error that there are too many objects for the primary key field, and if I try to alter its value only and then save again, I find that two records are saved, one for the first value and another one for the second value.
    Thanks in prior
    RJundi

  • Three level dependent  af:selectOnechoice

    Hi All,
    I am working with Jdev 11g (11.1.1.2.0)
    I am trying to create three level dependent af:selectOnechoice, First level is working fine, Second level is not working ,unable to retrieve the values..
    In Application module it is working fine, In Jspx page i am getting this issue.
    I have given autosubmit property as "true" to selectOnechoice 1 and partial trigger for selectOnechoice 1 from selectOnechoice 2
    similarly from 2nd level
    autosubmit property as "true" to selectOnechoice 2 and partial trigger for selectOnechoice 2 from selectOnechoice 3
    XML code for ur reference
    <af:selectOneChoice value="#{bindings.MenuTypeTr.inputValue}" label="#{bindings.MenuTypeTr.label}"
    required="#{bindings.MenuTypeTr.hints.mandatory}"
    shortDesc="#{bindings.MenuTypeTr.hints.tooltip}" id="soc1"
    binding="#{backingBeanScope.backing_untitled10.soc1}" autoSubmit="true">
    <f:selectItems value="#{bindings.MenuTypeTr.items}" id="si1"
    binding="#{backingBeanScope.backing_untitled10.si1}"/>
    </af:selectOneChoice>
    <af:selectOneChoice value="#{bindings.MainMenuTr.inputValue}" label="#{bindings.MainMenuTr.label}"
    required="#{bindings.MainMenuTr.hints.mandatory}"
    shortDesc="#{bindings.MainMenuTr.hints.tooltip}" id="soc2"
    binding="#{backingBeanScope.backing_untitled10.soc2}" autoSubmit="true"
    partialTriggers="soc1">
    <f:selectItems value="#{bindings.MainMenuTr.items}" id="si2"
    binding="#{backingBeanScope.backing_untitled10.si2}"/>
    </af:selectOneChoice>
    <af:selectOneChoice value="#{bindings.SubMenuTr.inputValue}" label="#{bindings.SubMenuTr.label}"
    required="#{bindings.SubMenuTr.hints.mandatory}"
    shortDesc="#{bindings.SubMenuTr.hints.tooltip}" id="soc3"
    binding="#{backingBeanScope.backing_untitled10.soc3}" partialTriggers="soc2">
    <f:selectItems value="#{bindings.SubMenuTr.items}" id="si3"
    binding="#{backingBeanScope.backing_untitled10.si3}"/>
    </af:selectOneChoice>
    Plz guide me, If any thing i missed or did wrong
    Thanks in Advance
    Regards,
    Zakir

    Hi,
    first of all make sure that dropdown queries are returning records. you can test it in bc4j tester ( right click on am and run).
    Also can look @ http://groundside.com/blog/GrantRonald?title=jdeveloper_11_live_demo_cascading_list_o&more=1&c=1&tb=1&pb=1
    or
    http://ranajitsahoo.blogspot.com/2008/05/how-to-implement-dependent-drop-down.html
    ~Abhijit

  • Filter second selectOneChoice depending on choice in first selectOneChoice

    I have JSP page Report_start.jsp. On this page found 3 selectOneChoice. 1 - Country, 2 - Archive, 3 - Fund.
    First falling out list (country) is filled by class FillCountryComboBox, located in file FillCountryComboBox.java.
    Second falling out list (archive) is filled by class FillArchiveComboBox, located in file FillArchiveComboBox.java.
    Third falling out list (fund) is filled by class FillFundComboBox, located in file FillFundComboBox.java.
    Data are found in views qCountry, qArchive, qFund. On event OnChange first selectOneChoice is fixed action "history.go(0)", since filling occurs at renovation of the page Report_start.jsp. Then me and it is necessary to hear, is chose some importance in list. When filling second falling out list it is necessary to take into account choice first, but when filling third falling out list it is necessary to take into account choice second.
    The Question - as in class FillArchiveComboBox to hear what importance is chose in list selecOneChoice1 (country)?
    I using JDeleloper 10.1.3, ADF BC, ADF Faces

    Hi,
    this example from Steve Muench has different background, but maybe will help you.
    (Cascading Lists in JSF [10.1.3]) http://radio.weblogs.com/0118231/stories/2004/09/23/notYetDocumentedAdfSampleApplications.html#62

  • How to disable selectOneChoice depending on checkbox checked or not!?

    Hello guys,
    im new in ADF and i'm trying to print report about some workers. I pick up those workers from selectOneChoice. Then i want to have this option to print a report for all the workers. I use check box (all workers) and want to disable selectonechoice if check box is checked.
    Any ideas!?
    thanks in advance,
    riffoman

    Hi,
    Always mention your JDev version.
    Don't go to Javascript solution so soon. Have a boolean property defined in your bean with accessors and bind it with the value property of your checkbox. Add the id of the checkbox to your SOC as partialTriggers and set autoSubmit for the checkbox. Set the disabled property of the SOC to the same property that you've used for the value of the checkbox.
    Ex :
    <af:selectBooleanCheckbox text="selectBooleanCheckbox 1" label="Label 1" id="sbc1"
                            value="#{requestScope.allWorksers}" autoSubmit="true"/>
                    <af:selectOneChoice label="Label 1" id="soc1" partialTriggers="sbc1" disabled="#{requestScope.allWorksers}">
                        <af:selectItem label="One" value="1" id="si1"/>
                        <af:selectItem label="Two" value="2" id="si2"/>
                    </af:selectOneChoice>I've used the requestScope variable directly. You can bind it to the bean property / the value of checkbox accordingly.
    -Arun

  • Can't create multiple dependent LOVs from the same bind variable

    Hi all,
    I'm having difficulty creating multiple dependent LOVs from queries based on the same bind variable in my JSF application (JDev 10.1.3.1). Basically I have a static LOV in a af:selectOneChoice component from which users select a value which then becomes the bind variable value for two separate queries that generate two different dependent LOV. Having developed the code along the lines of Steve Muench 's blog (http://radio.weblogs.com/0118231/2006/04/03.html#a685), the first dependent LOV works really well. The first dynamic LOV gets refreshed whenever the list from the static LOV changes, and I can execute other queries based on the values selected.
    The problem arises when I want to create the second dynamic/dependent LOV that has the same bind variable based on the same selected value from the static LOV. Here I would also like the functionality whereby the second dynamic LOV is also refreshed after the selected value in the static LOV changes. Thinking that all I had to do was replicate the methodology used in creating the first dependent LOV, I created the second iterator, invokeAction and other binding components in the PageDef. The executable section now looks like the following:
    <iterator id="SelectStaticQueryViewObjIterator"
                  Binds="SelectStaticQueryViewObj" RangeSize="-1"
                  DataControl="DMSApplicationModule1DataControl"/>
    <invokeAction id="refreshDynamicQuery1BindParameter"
                  Binds="ExecuteWithParams1" Refresh="prepareModel"
                  RefreshCondition="#{empty requestScope.VariableChanged}"/>
    <iterator id="SelectDynamicQuery1ViewObjIterator"
                  Binds="SelectDynamicQuery1ViewObj" RangeSize="-1"
                  DataControl="DMSApplicationModule1DataControl"/>
    <invokeAction id="refreshDynamicQuery2BindParameter"
                  Binds="ExecuteWithParams2" Refresh="prepareModel"
                  RefreshCondition="#{empty requestScope.VariableChanged}"/>
    <iterator id="SelectDynamicQuery2ViewObjIterator"
                  Binds="SelectDynamicQuery2ViewObj" RangeSize="-1"
                  DataControl="DMSApplicationModule1DataControl"/>I now have a problem whereby everytime I change the value of the static LOV, multiple HTML components for the same ADF component are being generated (the LOVs are refreshed via PPR). The surprising thing is that this duplicating behaviour applies to all ADF components listed after the first dynamic LOV in the *.jspx source. For example, I have a <af:outputText="Test Text"/> component created after the first dynamic LOV. Each time the value in the static LOV changes, a duplicate HTML component is created. This also applies to the 'related' second dynamic LOV which is bound to a af:selectOneChoice component - multiple dropdown lists are created. I've checked with the browser's Page Source and there are actually multiple html components being generated with their own unique ADF-generated IDs. I've tried all different options for the Referesh and RefreshCondition attibutes in the second invokeAction element but nothing seems to eliminate this issue.
    Any suggestions about how I might create multiple dependent LOVs from the same bind variable that get refreshed when the selected value changes would be greatly appreciated.
    Thanks
    George

    Hi all,
    Just updating the thread on how I've overcome this issue. As it stood the manner in which I was trying to solve my use case, as described above, was creating an absolute mess. Then with a blank sheet of paper I quickly realised that a much simpler solution would be to create a whole series of master-detail VOs and build my components around them. Thankfully I haven't had any issues going down this path as yet.
    Cheers
    George

  • Need help with dependent lists boxes with ADF.

    Hello,
    I am doing a project that use tree dependent list boxes.
    Ex. State---->
    College---->
    List of courses of the college chosen above----->
    The way this should work is when I select the state automatically I want it to change to the correspondent list of colleges of that state and after i choose the colleges I want to be able to get all the courses that are given in that college.
    To implement the first two list boxes I create tree views on JDeveloper and and using SelectOneChoice for both State and Colleges. In the binding editor I bind the first View with the second and then the second view with the third and at this point if I execute the first SelectOneChoice would give me all the state and the second SelectOneChoice would give me the list of all the colleges that exist.
    Now on the third view that I create a binding variable and i put a Where state=:TheBindingVariable on the query.
    Also I set the first SelectOneChoice the outoSubmit property to true, id to StateId and PartialTrigger property to CollegeId.
    On pageDef.xml in the bindings I create action form where I select the third view from Date Collection and select Action as ExecuteWithParams. And I set the value under the parameters section to #{bindings.state.inputValue}.
    Under executables still in pageDef.xml I create a invokeAction and I set binds = ExecuteWithParams.
    On first SelectOneChoice on the ChangeValueListener i create a new ManageBeans which generate me a java class and I create a new method as well to use it to change the binding variable on the second SelectOneChoice.
    Here is the method:
    public void Change_StateId(ValueChangeEvent valueChangeEvent) {
    String StateId;
    valueChangeEvent.setPhaseId(PhaseId.INVOKE_APPLICATION);
    FacesContext adi = FacesContext.getCurrentInstance();
    ValueBinding vb = adi.getApplication().createValueBinding("#{bindings}");
    DCBindingContainer bc = (DCBindingContainer)vb.getValue(adi);
    if(valueChangeEvent.getNewValue().toString().equals("0")){
    StateId = "MA";
    OperationBinding opBindingCollegeLovIter = (OperationBinding) bc.get("ExecuteWithParams");
    opBindingCollegeLovIter.getParamsMap().put("TheState",StateId);
    opBindingCollegeLovIter.execute();
    }else{
    DCIteratorBinding statesLovIter = (DCIteratorBinding) bc.get("CollegeProvaView1Iterator");
    Row rw = statesLovIter.getRowAtRangeIndex(((Integer)valueChangeEvent.getNewValue()).intValue());
    StateId = (String) rw.getAttribute("State");
    OperationBinding opBindingCollegeLovIter = (OperationBinding) bc.get("ExecuteWithParams");
    opBindingCollegeLovIter.getParamsMap().put("TheState",StateId);
    opBindingCollegeLovIter.execute();
    I don't know what I have done wrong because I am new in this field and a little support would be really helpful.
    I am using JDeveloper 10.1.3.1.0 and Oracle SOA Suite 10.1.3.1.0.
    I would appreciate any help.
    Thanks a lot.

    user8116089 wrote:
    For some reason the first selectonechoice doesn't give me all the states that are in the database it gives me just the first 10.check the value of RangeSize for itarator in pageDef. in this case to show all items it must be set to -1
    Also there is a way to assign the first value of the first selectonechoice to null at the start.this is a problematic requirement since all items are bound to iterator and basically this should serve for navigation purpose so the first item is set as selected, but maybe some workaround exists...
    regards,
    Branislav

Maybe you are looking for

  • End of FIle I/O Issue

    I am writing a realtime system which reads a file as it is being written. When using a FileInputStream, once the EOF has been reached, all read methods continue to return -1, even if more data has been written to the file. I have the restriction of u

  • Prperty editor not coming for roles in dev server

    Hi all, Actually in my development server ,when iam clicking on any of the roles the property editor on the right panel is not coming ,whereas for iviews this problem is not there ,please help me with this isssue and guide me with the necessary  step

  • How PO/Outbound delivery idoc can be triggered automatically once PO is created.

    Hi All, We have a requirement that we need to automate the process of generation of Purchase Order & Outbound Delivery Idocs as soon as they are created in using ME21N and VL02N standard tcodes. Currently we are using ZDID Output type as craeted in N

  • How to hide a tab in CIC0?

    Hello All, Can You guide Me to hide the 'Details' tab in CRM in the transactiobn CIC0. Regards Elini.P

  • How to open a .pll anyway, included .pll is missing

    Hi, I want to see the source of a pl/sql library (.pll), but when i try to open it, it says another (included) .pll is missing/not found. Is there a way to open the .pll anyway, or view the source in another way? Regards, Paul.