JSF Richfaces call server side method from client side java script

Tuesday, June 9, 2009 0:21
Posted in category Java

With the most strong JSF + Richfaces framework combination for Java Ajax application, it is very easy to call server side methods from client side java script or call your server side event method from other jsf component easily. Following is the smart & small tip to do this.

<rich:simpletogglepanel label=”Sample Page” onexpand=”buildPage()”></rich:simpletogglepanel>

<a4j:jsfunction name=”buildPage” action=”#{controller.buildAllPage}” reRendr=”grid” limitToList=”true”></a4j:jsfunction>

Now you can call the server side method “buildAllPage” of controller backing bean when the toggle panel expand.

You can call the method with your desired component combination where possible.

Share and Enjoy:
  • Digg
  • del.icio.us
  • Netvouz
  • DZone
  • ThisNext
  • MisterWong
  • Wists
  • blogmarks
  • Furl
  • Reddit
  • Spurl
  • StumbleUpon
  • Technorati
  • YahooMyWeb
  • Facebook
  • Live
  • Yahoo! Buzz
You can leave a response, or trackback from your own site.

One Response to “JSF Richfaces call server side method from client side java script”

Leave a Reply