Hi everybody!
I need to use linked comboboxes in JSF via RichFaces, and I'm facing some problems.
First combobox is a list of clients.
Second combobox is a list of projects.
When user selects client, list of projects, for that client should be available.
Here is the code:
<h:selectOneMenu id="clieId" value="#{task.task.clieId}" title="ClieId" required="true" requiredMessage="The clieId field is required." > <f:selectItems value="#{client.clientItemsSelectOneByName}"/> <a4j:support event="onchange" actionListener="#{project.clientSelected}" reRender="projId" /> </h:selectOneMenu> <h:outputText value="Project:"/> <h:selectOneMenu id="projId" value="#{task.task.projId}" title="ProjId" > <f:selectItems id="projIdElems" value="#{project.projectItemsAvailableByNameForClient}"/> </h:selectOneMenu>
http://livedemo.exadel.com/richfaces-demo/richfaces/support.jsf?tab=selects
seems the case you need?