Wednesday, December 26, 2012

Adding jQuery capabilities into JSF2

jQuery is very popular in these days. Some of the advanced JSF2 implementations are bundled the jQuery together. But, for the native JSF2 implementation (Sun or Myfaces) is not.

Thus, if you are using the native JSF2 implementation, and wish to use the jQuery in the application, the jQuery library can be added manually with the following steps.


Steps
1. download jQuery library.

2. add the jQuery js file into the resources folder.
resources, then jQuery folder

3. add the jQuery into xhtml when required.
<h:outputScript library="jquery" name="jquery.js" />

4. test / verify the jQuery installation is correct.

Done!!

LinkWithin

Related Posts Plugin for WordPress, Blogger...