Originally posted by Tushar Kherde:
Thanks for reply
I cant use javascriprt because i am populating 2nd dropdown from database and not using ajax also.
Cant we do this using plain JSF on some event, if we render the whole page again.
You can do it this way
<h:selectOneMenu valueChangeListener="#{Bean.listenerMethod}" onchange="submit()" value="#{Bean.value}">
<f:selectItems value="#{Bean.list}"/>
</h:selectOneMenu>
And in the Bean you only need to add a method like this
public void listenerMethod( ValueChangeEvent e ) throws AbortProcessingException{
Object value = e.getNewValue();
}
There you will have the value you selected in the list and you can use it to populate the other dropdown.
I hope this helps
[ February 14, 2007: Message edited by: Andres Quinones ]