javajsficefacesicefaces-1.8

Trigger the render of a combo box when the other's value is changed in JSF 1.2


I would like to implement a cascading combo selection where there is a "master" combo and a "slave". When the master's value is changed I would like to rerender the slave so its select options get updated. I know it is possible using <f:ajax> in JSF 2 but I'm sticked to JSF 1.2 using ICEFaces 1.8.2. I'm not assembling my page using xml, but using JSF API programmatically, so I can't provide you a snippet.


Solution

  • Try to enable partial submit:

    <ice:selectOneMenu id="master" partialSubmit="true" value="#{bean.selection}">
      ...
    </ice:selectOneMenu>
    

    This should submit selected value through ajax whenever you make a choice. The other combobox will be rerendered if its options change based on the new master value in model.