Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Dropdown change on clicking buttons  RSS feed

 
Messagezs Herozs
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Could anyone suggest me how to do this in JSF

I have a dropdown menu showing some options. ( List with 10-12 dropdown city items like Atlanta, Athens, Cumming, Savannah).

Below is the code for that:

<TD colspan="3" align="center">
<h:selectOneMenu id="itemCd" immediate="true" value="#{facility.itemCd}" onchange="submit();" valueChangeListener="#{controller.clientIDSelected}">
<f:selectItem itemValue="select" itemLabel=" SELECT INDIVIDUAL ITEM "/>
<f:selectItems value="#{facility.items}"/>
</h:selectOneMenu>
</TD>

Below to this , I have two buttons PREVIOUS and NEXT.

<h:commandButton id="prev" value="Submit" />...
<h:commandButton id="next" value="Submit" />


For Example, If I have selected Athens city in dropdown list´┐Ż.on clicking Previous it should go to Atlanta , on clicking Next it should show Cumming on dropdown list

How could I do this..

Thanks,
Message2hero
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!