This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes JSF and the fly likes How to create a h:selectOneMenu with a default value? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » JSF
Bookmark "How to create a h:selectOneMenu with a default value?" Watch "How to create a h:selectOneMenu with a default value?" New topic
Author

How to create a h:selectOneMenu with a default value?

Mc. Alvin Bautista
Greenhorn

Joined: Jul 17, 2006
Posts: 10
Hello guys,

Do you have any idea on how to create a dropdown box in jsf with default value? For example I have a list of values:

value[0] = "default"
value[1] = "ABC"
value[2] = "DEF"

Then after setting the list of values, I will populate the dropdown box. What if I have a default value of "DEF" in my dropdown box, how could I display it to be the default value on the dropdown box. Can anyone help me?
Thanks in advance.
Rajeev Ravindran
Ranch Hand

Joined: Aug 27, 2002
Posts: 455
is this what you are looking for ? http://www.coderanch.com/t/211197/JSF/java/JSF-drop-down


thanks,
 
GeeCON Prague 2014
 
subject: How to create a h:selectOneMenu with a default value?