• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to invoke an action in jsf using ajax

 
Ranch Hand
Posts: 161
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Saloon Keeper
Posts: 27807
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you Tim
 
reply
    Bookmark Topic Watch Topic
  • New Topic