• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to reset pickList in JSF

 
Vivek Kanodia
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have a form which has textbox,picklist and a reset button.
<h:commandButton value="Reset" type="reset" class="create"></h:commandButton>
Now on click of reset button, the textboxes gets resetted. But if I have selected any item in pickList from source to target,the picklist does not get resetted.
Can anyone help me in resetting the pickList.
 
Guy deLyonesse
Ranch Hand
Posts: 200
Eclipse IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Better to have the button call an action event in your backing bean, and refresh the arrayList that feeds your menu. You also may need to override part of the JSF life cycle to make sure the event fires at the right time to actually update at the right point.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!