This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JSF and the fly likes Doubt in h:selectItems Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Doubt in h:selectItems" Watch "Doubt in h:selectItems" New topic

Doubt in h:selectItems

Hari Dhanakoti
Ranch Hand

Joined: Jan 07, 2008
Posts: 74

I am a new bie in JSF and i am now trying to set values to a combobox as in HTML.

<select name="abcd" id="abcd">
<option value="123">One</option>
<option value="123">One</option>
<option value="123">One</option>

How to achieve in getting the different value in option display and the different value in the option value.

<h:selectItems value = "#{object.Value}"/>

Duc Vo
Ranch Hand

Joined: Nov 20, 2008
Posts: 254
This topic may help you.

“Everything should be as simple as it is, but not simpler.” Albert Einstein
It is sorta covered in the JavaRanch Style Guide.
subject: Doubt in h:selectItems
Similar Threads
Any Suggestion about a small project?
How to add and remove options in dropdown menu?
Select Item Styles
Null vs empty string