Only 48 hours left in the trailboss' kickstarter!

New rewards and stretch goals. CLICK HERE!



  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to invoke an action in jsf using ajax  RSS feed

 
Nila dhan
Ranch Hand
Posts: 161
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to invoke a jsf action using ajax.
I have a MultiselectList box

Onclick of the List box, I have invoke an action in the CCW bean. The action is CCW>fetchResults()
Please advice
 
Tim Holloway
Bartender
Posts: 18531
61
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe what you really want is "onchange", not "onclick". If you do brute-force AJAX, your AJAX method will have to manually extract the new value from the listbox and send it to the server, and the server will need an appropriate URL handler - you can't just expect a JSF action method to be fired.

RichFaces, IceFaces, and several other extension tagsets have built-in AJAX support that can make this job much easier, including providing the ability for fire a backing bean action method or event.
 
Nila dhan
Ranch Hand
Posts: 161
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Tim
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!