0 Replies Latest reply on Oct 31, 2006 8:31 AM by Yogesh

    Ajax Problem With Combo Boxes

    Yogesh Novice

      Hi All,
      I have the following use case:
      - provide a List of Firms with one h:selectOneMenu
      - provide a List of Users in the Selected Drop Down Menu as above


      I am implementing this using Ajax such that when the value of the Drop Down Menu which lists the firms changes, the second drop down menu is automatically refreshed with the users found in the firm selected in the First Drop down menu


      The code for the first selectOneMenu is as follows:

      
       <h:form>
       <h:selectOneMenu value="#{userFirmEditorBean.selectedFirm}" immediate="true"
       converter="#auditorEditorBean.auditFirmList.converter}">
       <f:selectItems
       value="#{auditorEditorBean.auditFirmList.selectItemList}" />
      
       <a4j:support event="onchange"
       action="#{auditorEditorBean.reInitilizeAuditFirms}"
       reRender="EditAuditorForFinancialStatement" />
      
       </h:selectOneMenu>
       </h:form>
      
      
      
      
      
      
      
      



      While the code for the second drop down menu is as follows:

      
      
       <h:form>
       <h:message for="newAuditor" showDetail="true" showSummary="true"/>
       <h:selectOneMenu id="newAuditor" value="#{auditorEditorBean.newStmtAuditorFromList}"
       converter="#{auditorEditorBean.auditorSelectList.converter}">
      
       <f:selectItems
       value="#{auditorEditorBean.auditorSelectList.selectItemList}" />
      
       </h:selectOneMenu>
       <a4j:commandButton value="#{commonBundle.Ok}"
       action="#{auditorEditorBean.addAuditorToStmt}"/>
      
       </h:form>
      
      
      




      Both forms are contained in the same "a4j:outputPanel" .....



      My problem is that when the value of the first drop down menu changes, the second drop down menu is correctly refreshed with the corresponding users in the selected firm.....but this value cannot be unbound to the SFSB......


      Any help on this .....


      Thnx in advance,
      Jankee Yogesh

      http://www.m-itc.net