PrimeFaces is a lightweight library with one jar, zero-configuration and no required dependencies. You just need to download PrimeFaces, add the primefaces-{version}.jar to your classpath and import the namespace to get started.
Namespaces
PrimeFaces namespace is necessary to add PrimeFaces components to your pages.
1 |
xmlns:p="http://primefaces.org/ui" |
For PrimeFaces Mobile, the namespace would be;
1 |
xmlns:p="http://primefaces.org/mobile" |
Test Run
That’s it, now you can add a test component to see if everything is ok.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:p="http://primefaces.org/ui"> <h:head> </h:head> <h:body> <p:spinner /> </h:body> </html> |