aspose 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 Java 8 in Action this week in the Java 8 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: 15661
    
  15

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to change the values in h:selectOneMenu?
 
Similar Threads
dyanmic dropdown
h:selectOneMenu breaking up in IE 9
Issue With selectOneMenu ValueChangeListener Not Firing
how to render a component based on condition
Setting the default drop-down list value