File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSF and the fly likes a4j:support onchange event not firing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "a4j:support onchange event not firing" Watch "a4j:support onchange event not firing" New topic

a4j:support onchange event not firing

Floyd Montgomery

Joined: Sep 30, 2010
Posts: 7

I'm having a little problem with an a4j:support tag which is not firing.

When I select a country (placeCountry), the first a4j:support fires the onclick event and then rerenders the selectTown selectOneMenu, which then displays a town.
Now as the selectTown changes, it should fire the onchange event and rerender placesFound... but it does not.

Any help would be appreciated
Thanks : o)
Devaka Cooray
ExamLab Creator

Joined: Jul 29, 2008
Posts: 3915

"zzzer zzer", please check your private messages regarding an important administrative matter.

Author of ExamLab ExamLab - a free SCJP / OCPJP exam simulator
What would SCJP exam questions look like? -- Home -- Twitter -- How to Ask a Question
Max Katz
Ranch Hand

Joined: Aug 03, 2009
Posts: 72
When you reRender selectTown, you are changing the value on the server. It's not a client event, so nothing gets triggered on the client. You would need to actually change the value in selectTown for the Ajax request to be fired. Hope this helps.

You could try and play with oncomplete attribute and a4j;jsFunction to fire the next Ajax request.

Floyd Montgomery

Joined: Sep 30, 2010
Posts: 7
Problem solved:

on the first

on the second

on the third

I agree. Here's the link:
subject: a4j:support onchange event not firing
jQuery in Action, 3rd edition