PrimeFaces Extensions is a lightweight add-on to PrimeFaces: one jar, zero-configuration and it uses the PrimeFaces themes. Add it next to PrimeFaces and import the namespace into your XHTMLs to get started.
PrimeFaces Extensions is usually added as Apache Maven dependency next to PrimeFaces. (Or alternatively Gradle dependency or manual download.) Use the same major version of PrimeFaces and PrimeFaces Extensions.
<dependency>
<groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId>
<version>17.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.primefaces.extensions</groupId>
<artifactId>primefaces-extensions</artifactId>
<version>17.0.0-SNAPSHOT</version>
</dependency>A few features need an optional dependency, add it only when you use them:
org.primefaces.extensions:resources-monacoeditor: MonacoEditorcom.google.code.gson:gson: GChart, Layout, MarkTextcom.googlecode.owasp-java-html-sanitizer:owasp-java-html-sanitizer: sanitizing convertersorg.commonmark:commonmark: Markdown in Localizeddev.morphia.morphia:morphia-core: MorphiaLazyDataModelSee the documentation for details.
The PrimeFaces Extensions namespace is necessary to add its components to your pages.
<html xmlns:p="primefaces"
xmlns:pe="primefaces.extensions">
</html>That's it, now you can add a test component to see if everything is ok.
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="jakarta.faces.html"
xmlns:p="primefaces"
xmlns:pe="primefaces.extensions">
<h:head>
</h:head>
<h:body>
<h:form>
<p:inputText>
<pe:calculator />
</p:inputText>
</h:form>
</h:body>
</html>Browse the components in the menu, or look up every tag and attribute in the Tag Library.