«

»

Jun
09

JSF Richfaces call server side method from client side java script

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.

VN:F [1.9.13_1145]
Rating: 4.7/10 (3 votes cast)
VN:F [1.9.13_1145]
Rating: 0 (from 2 votes)
JSF Richfaces call server side method from client side java script, 4.7 out of 10 based on 3 ratings

About the author

Faisal Basra

Faisal Basra is an independent consultant, software developer, writer, blogger, speaker, architect and technology leader in Lahore, Pakistan. He has been a professional software developer since 2008, has been writing code since 2006. Having hands on experience of popular Java EE frameworks & technologies like JSF, Spring, Hibernate, Enverse, JPA, Richfaces, Primefaces, JSP/Servlet. I have taken many initiatives while working with teams. Some of includes Automated Build & Release Management system via Hudson, Maven, Archiva & SVN. Blogging is my hobby and I also initiated blog at corporate level from setting up complete blog for company, content generation strategy and visibility over the Internet by Internet Marketing. Framworks & Technologies: JSF, Richfaces, Primefaces, Openfaces, Struts, Hibernate, Spring, ORMLite Tools & Servers: jUnit, Log4j, Maven, Eclipse, MyEclipse, NetBeans, Tomcat, Jboss, WebLogic Mobile Development: Google Android Marketing: Internet Marketing, Mobile App Marketing

Permanent link to this article: http://www.javaplex.com/blog/jsf-richfaces-call-server-side-method-from-client-side-java-script/

1 comment

  1. Prabhat Jha (http://sensiblerationalization NULL.blogspot NULL.com/) says:

    http://sensiblerationalization.blogspot.com/2009/07/from-jsf-to-richfaces-to-richfaces.html (http://sensiblerationalization NULL.blogspot NULL.com/2009/07/from-jsf-to-richfaces-to-richfaces NULL.html)

    VA:F [1.9.13_1145]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.13_1145]
    Rating: 0 (from 0 votes)

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>