Saturday, June 8, 2013

How to install PrimeFaces Extensions in a PrimeFaces project

I was looking to install PrimeFaces Extensions into my PrimeFaces project, but I failed to find any website that mention how PrimeFaces Extensions install into a PrimeFaces project.

Thus, I have to try and error by myself. 

Then I copied the primefaces-extensions-0.6.2.jar into my PrimeFaces project and start the Tomcat.
Unfortunately, the application failed to start and showing the following error.
Caused by: java.lang.ClassNotFoundException: org.apache.commons.lang3.StringEscapeUtils
 at org.apache.catalina.loader.WebappClassLoader.loadClass(
 at org.apache.catalina.loader.WebappClassLoader.loadClass(
 at java.lang.Class.forName0(Native Method)
 at java.lang.Class.forName(Unknown Source)
 at com.sun.faces.util.Util.loadClass(
 at com.sun.faces.config.processor.AbstractConfigProcessor.loadClass(
 at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.processFunctions(
 ... 14 more

It's required me to add in commons-lang3-3.1.jar into the project and restart again.

this time I was successfully start the Tomcat server, and tested the PrimeFaces Extensions with the following code.
<pe:inputNumber id="input2" value="#{testBean.numberValue}"
                symbol=" CHF" symbolPosition="s"
                decimalSeparator="," thousandSeparator=".">
    <p:ajax event="blur" />

pe:inputText component


copy the following jar into the existing PrimeFaces project and test the PrimeFaces Extensions again
1. primefaces-extensions-0.6.2.jar
2. commons-lang3-3.1.jar

It should works!




Related Posts Plugin for WordPress, Blogger...