You didn't specify the version, so I'll assume JSF 1.2. The <a4j:support>
tag is part of RichFaces:
<h:selectOneMenu id="firstDropDown" value="#{bean.firstDropDownSelection}">
<f:selectItems value="#{bean.items}" />
<a4j:support event="onchange" reRender="secondDropDown"
immediate="true" action="#{bean.fetchItems2}" />
</h:selectOneMenu>
<h:selectOneMenu id="secondDropDown" value="#{bean.secondDropDownSelection}">
<f:selectItems value="#{bean.items2}" />
</h:selectOneMenu>
And in the method bean.fetchItems2
you load your collection items2
with the appropriate items.
What happens, is when the value of the first drop down changes, the second drop down is rerendered and its value is fetched from the server again.