Hi,
I have 3 drop-downs. 1st drop-down contains some values when the page loads. I need to populate 2 nd drop-down based on the value selected in 1st dropdown. Similarly, I need to populate 3 nd drop-down based on the value selected in 1st and 2nd dropdown.
Initially I tried like this.
<h:selectOneMenu value="#{stu.country}" >
<f:selectItems value="#{bean.allCountries}" />
<a4j:support event="onchange" action="#{bean.retrieveStates(stu.country)}"
reRender="states_dropDown"></a4j:support>
</h:selectOneMenu>
//ly, for 2nd drop-down
<h:selectOneMenu id="states_dropDown" value="#{stu.state}" >
<f:selectItems value="#{bean.allStates}" />
<a4j:support event="onchange"
action="#{bean.retrieveCities(stu.country,stu.state)}"
reRender="City_dropDown"></a4j:support>
</h:selectOneMenu>
Some times this code works fine. But some times it doesn't invoke managed bean method.
Can you please help??