• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

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

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 455
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
is this what you are looking for ? https://coderanch.com/t/211197/JSF/java/JSF-drop-down


thanks,
 
reply
    Bookmark Topic Watch Topic
  • New Topic