jQuery in Action, 2nd edition*
The moose likes JSF and the fly likes selectOneMenu ValueChangeListener not Firing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "selectOneMenu ValueChangeListener not Firing" Watch "selectOneMenu ValueChangeListener not Firing" New topic
Author

selectOneMenu ValueChangeListener not Firing

Abiodun Adisa
Ranch Hand

Joined: Jan 17, 2002
Posts: 495
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

Joined: Dec 28, 2006
Posts: 893
Change the line from

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

to

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


Remko (My website)
SCJP 1.5, SCWCD 1.4, SCDJWS 1.4, SCBCD 1.5, ITIL(Manager), Prince2(Practitioner), Reading/ gaining experience for SCEA,
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: selectOneMenu ValueChangeListener not Firing