This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

selectOneMenu ValueChangeListener not Firing

 
Abiodun Adisa
Ranch Hand
Posts: 495
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have this menu and the ValueChangeListener only fires when i submit the page, but i want it to fire whenever i change the value of the menu. Please can someone help




<h:form>
<h:selectOneMenu valueChangeListener='#{content.processValue}' value="#{content.education}">
<f:selectItems value="#{content.abbey}"/>
</h:selectOneMenu>
<h:commandButton value="success" actionListener="#{content.doIt}"></h:commandButton>
<h:messages showDetail="true"></h:messages>
</h:form>
 
Remko Strating
Ranch Hand
Posts: 893
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Change the line from

<h:selectOneMenu valueChangeListener='#{content.processValue}' value="#{content.education}">

to

<h:selectOneMenu valueChangeListener='#{content.processValue}' value="#{content.education}" onchange="submit()" >
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic