Quick Question - Removing submit button for JS
At the minute I've got a drop down list, who's value is passed back to my bean using a submit button, though I want to pass it's value when a new item is selected, and have the bean fire off another method.
Eg.
My list has |Ford|BUTTON
|VW |
Clicking my h:commandButton fires off a method to populate a list which is displayed below the selectOneMenu with values like Mondeo, focus etc or if the user picks VW only VW cars are shown. Though I want to have the list updated from selection in the drop down rather than having to use the submit button also.
JSP code
<h:selectOneMenu id="num_id" value="#{Object.car}">
<f:selectItems value="#{Object.carValuesMap}"/>
</h:selectOneMenu>
<h:commandButton value="Submit" [b]action="#{ActionBean.changeCarSelected}" [/b]id="submit" />
<t:datatable ... value="{Object.valuesList}" var="type">
This means hitting submit repopulates "valuesList" and then when the page is redisplayed, the list contains the new values. This is working fine but how can I set my JSF <h:selectOneMenu> to fire off the action action="#{ActionBean.changeCarSelected}" without the user having to use the commandButton?
Thanks for any help.
Michael

