• Post Reply Bookmark Topic Watch Topic
  • New Topic

Newbie selectOneListBox question  RSS feed

Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a page that has a listbox and a reset button. The reset button is supposed to set the data back to the values it had when the page first loaded. When I pick a value off the listbox, that value stays in the "selected" area of the box, but when I hit the reset button, the "selected" value reverts to the first item in the listbox. Is there some way to hold on to the selected value when I press the reset button?

Code is below.

<h:selectOneListbox id="uiSelectionField" size="1"
onchange="this.form.submit()" immediate="true">

<f:selectItem itemValue="IssueStatus" itemLabel="Status"/> <f:selectItem itemValue="IssueEnvironment" itemLabel="Environment"/> <f:selectItem itemValue="IssuePriority" itemLabel="Priority"/>
<f:selectItem itemValue="IssueRelease" itemLabel="Release"/>
<f:selectItem itemValue="IssueType" itemLabel="Issue Type"/>
<f:selectItem itemValue="IssueFunction" itemLabel="Function"/>
<f:selectItem itemValue="IssueModule" itemLabel="Module"/>
some omitted code
<h:commandButton value="Reset" action="#{projectListener.listuiSelections}"/>
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!