Select a planet and a moon. The list of moons depends on the selected planet.
The planet-dropdownbox contain a
<f:ajax render="moonbox"/>
.
With it, the moon-dropdownbox will be rerendered, after a value changed in planet-dropdownbox.
<tc:selectOneChoice label="Planet"
value="#{selectOneChoiceController.planet}">
<f:selectItems value="#{selectOneChoiceController.planets}"/>
<f:ajax render="moonbox"/>
</tc:selectOneChoice>
<tc:selectOneChoice id="moonbox" label="Moon">
<f:selectItems value="#{selectOneChoiceController.moons}"/>
</tc:selectOneChoice>