• 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
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

selectOneMenu ValueChangeListener not Firing

 
Ranch Hand
Posts: 495
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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>
 
Ranch Hand
Posts: 893
Tomcat Server Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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()" >
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic