1 Reply Latest reply on Dec 8, 2011 3:49 AM by Venkataramana Reddy

    a4j:ajax with h:selectOneMenu problem

    Venkataramana Reddy Newbie

      I have been using the below code... When I select the value from the selectOneMenu the valueChangeListener is calling, but the selected value fromthe drop-down is not going at the time of call


      For Ex: If we think dropdown values are (A,B,C,D)... Initally the value will be A.... when i change the value to C.. the listener is called at this point of time the value to the java class is passed as A only instead of the selected value C.... If we select the value D.. the value to the java class will be C... mean to say the previous value is going to the JAVA class....



      <h:selectOneMenu defaultLabel="A" valueChangeListener="#{timeSheetReportBean.loadMembers}"


                   id="location" style="width:140px;">

                           <f:selectItems value="#{timeSheetReportBean.locationList}" />

                                                        <a4j:ajax render="members" event="valueChange" execute="@this" />




      <h:selectManyListbox id="members" size="6"

                                                        value="#{timeSheetReportBean.timesheetReportDto.memberIds}" style="width:140px;">

                                                        <f:selectItems value="#{timeSheetReportBean.members}" />



      Can any one help me on this.....