wood burning stoves 2.0*
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
Author

a4j:support onchange event not firing

Floyd Montgomery
Greenhorn

Joined: Sep 30, 2010
Posts: 7
Hi,

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
Saloon Keeper

Joined: Jul 29, 2008
Posts: 3019
    
  35

"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
Greenhorn

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


on the first

on the second

on the third


Thanks!
 
Consider Paul's rocket mass heater.
 
subject: a4j:support onchange event not firing
 
Similar Threads
Convert List<SelectItem> to an Array
Fire an ajax Request inside a rich:modalPanel
need help on jsf error message
(Begginer on JSF) need help with a4j:support and c:forEach
rich:comboBox valueChangeListener is not working