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 Spring in Action this week in the Spring 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: 16142
    
  21

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?