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>
<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>