1 Reply Latest reply on Mar 4, 2013 8:41 AM by Frank Nimphius-Oracle

    AddPartialTarget causes valueChangeListener invoked multiple times

      Hi All,

      I am using JDev

      I have a problem with programmatic ppr using addPartialTarget method.

      The scenario is as follows:

      I have an af:table in which 2 of the columns include selectOneChoice in each: ( select1 and select2 ).

      The values of select2 depends on select1. For example, select1 has countries, and select2 has cities of the selected country of select1.

      So, in valueChangeListener of select1, based on the selected value, get the respective cities, put into the list used by select2. And after everything finished, refresh the select2 using AdfFacesContext.getCurrentInstance().addPartyTarget(this.getSelect2()).

      The problem is that the valueChangeListener of select1 (countryChangeListener) is called multiple times. Then it shows NullPointerException pop-up in the ui. But I can't find the exception trace in my log. I found that it's not coming from the listener method when I debug.

      Below is the jsff content:

      +<af:column headerText="#{bindings.tableVO1.hints.Country.label}" id="c16">+
      +<af:selectOneChoice label=""+
      +<f:selectItems value="#{pageFlowScope.countryList}"+

      +<af:column headerText="#{bindings.tableVO1.hints.City.label}" id="c8">+

      +<af:selectOneChoice label="" id="soc4"+
      +<f:selectItems value="#{row.bindings.CityList.inputValue}"+

      The problem also occurs for other select boxes in that table.

      Although I solved it by using *partialTriggers=soc1* in city select box in jsff, it works (it refreshes the city select box and shows the values), I don't know why the programmatic refresh with addPartialTarget() is not working.

      Can you all please help with that issue? Because I need to use addPartialTarget for other cases.


      Best Regards,