aspose file tools*
The moose likes JSF and the fly likes Setting current value in SelectItem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Setting current value in SelectItem" Watch "Setting current value in SelectItem" New topic
Author

Setting current value in SelectItem

Steve Aye
Greenhorn

Joined: Mar 27, 2006
Posts: 2
Is there a way to set the current item in an h:selectOneMenu item? The list is comprised of an ArrayList of SelectItems where a user can choose a name to retrieve by. However, one of the options is <All> and when they click the clear button, I want to default that value back to <All>. Is there a way to set the current value of the selected item somehow?
Rajeev Ravindran
Ranch Hand

Joined: Aug 27, 2002
Posts: 455
if you want to set the value of dropdown on buttonclick you can do it using javascript

if that is not what you are looking for, please have a look at this thread.

Thanks,
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Setting current value in SelectItem
 
Similar Threads
XML Validation using XML Schema
mandatory attributes for c:forEach
Generate Radio Buttons
Struts logic and html select
How to use array of beans in jsp