• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Newbie selectOneListBox question

 
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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"
valueChangeListener="#{projectListener.listuiSelections}"
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"/>
</h:selectOneListbox>
.
.
some omitted code
.
.
<h:commandButton value="Reset" action="#{projectListener.listuiSelections}"/>
 
I was born with webbed fish toes. This tiny ad is my only friend:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic