wood burning stoves 2.0*
The moose likes JSF and the fly likes how to change the values in h:selectOneMenu? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "how to change the values in h:selectOneMenu?" Watch "how to change the values in h:selectOneMenu?" New topic
Author

how to change the values in h:selectOneMenu?

kahkean chor
Ranch Hand

Joined: Jan 26, 2013
Posts: 56
<h:selectOneMenu value="#{newJSFManagedBean.month}">
<f:selectItems value=
"#{newJSFManagedBean.monthList}"/>
</h:selectOneMenu>

<h:selectOneMenu value="#{newJSFManagedBean.year}">
<f:selectItems value=
"#{newJSFManagedBean.dateList}"/>
</h:selectOneMenu>

how to change/refresh the values of date after month is selected? thanks


[Thumbnail for Untitled.jpg]

Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15951
    
  19

You must either require the user to click on a commandButton or commandLink to submit the form that contains those controls.

OR

You must attach AJAX functionality to the selectOneMenu controls so that they submit themselves.

Until the form data is submitted to the server, the server can do nothing.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
 
subject: how to change the values in h:selectOneMenu?
 
Similar Threads
how to render a component based on condition
Issue With selectOneMenu ValueChangeListener Not Firing
Setting the default drop-down list value
dyanmic dropdown
h:selectOneMenu breaking up in IE 9