Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Default value for a selectOneListbox

 
Ian Dunsirn
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have this listbox:

<h:selectOneListbox id="newStatus" size="1" value="#{thisIssue.status}">
<f:selectItems value="#{dropDown.statusList}"/>
</h:selectOneListbox>

What I would like is for the value to appear in the listbox to match what is in thisIssue.status. How can I do this because right now, I get the first value of dropDown.statusList instead of the value that is in thisIssue.status.

Am I missing something here?
 
Remko Strating
Ranch Hand
Posts: 893
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Take the default value as the default value of your backing bean
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic