File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 Android Security Essentials Live Lessons this week in the Android 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: 15959
    
  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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: how to change the values in h:selectOneMenu?
 
Similar Threads
Issue With selectOneMenu ValueChangeListener Not Firing
h:selectOneMenu breaking up in IE 9
how to render a component based on condition
Setting the default drop-down list value
dyanmic dropdown