This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JSF and the fly likes selectOneMenu and ajax support Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "selectOneMenu and ajax support" Watch "selectOneMenu and ajax support" New topic
Author

selectOneMenu and ajax support

Karl Krasnowsky
Ranch Hand

Joined: Jan 16, 2009
Posts: 97
I'm using a selectOneMenu and have it doing some rerendering of page sections when the selection is changed.
For this I'm keying of the onchange event (makes sense) and for the most part it works.
so, like this:

However it seems to only fire an onchange event when you use the mouse to make the change.
Curiously, scrolling up and down the list with the up and down arrows doesn't fire this event, although the actual selection in the input control changes.

I'd like this to work in the same manner. If the input selection changes regardless how, so should the corresponding fields that are targeted for rerendering.

Can someone provide some assistance?

thanks!


[SCJP 6]
[SCBCD in process]
Max Katz
Ranch Hand

Joined: Aug 03, 2009
Posts: 72
Use 'onkeyup' event

Max
http://mkblog.exadel.com
Karl Krasnowsky
Ranch Hand

Joined: Jan 16, 2009
Posts: 97
Hey Max,
Well, in fact that's it. Not sure why my prior testing didn't see the onkeyup event working.
But it is working like a champ. So not only the arrow keys, but any alpha changes as the result of pressing normal keys.

thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: selectOneMenu and ajax support
 
Similar Threads
Issue With selectOneMenu ValueChangeListener Not Firing
edit able
How to create an action listner?
a4j:support listener event does not fire in myfaces/tomahawk application
A Problem with events