Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Mc. Alvin Bautista
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 455
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
is this what you are looking for ? http://www.coderanch.com/t/211197/JSF/java/JSF-drop-down


thanks,
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic