Quarkus PrimeFaces
A Quarkus extension that lets you utilize PrimeFaces and PrimeFaces Extensions make JSF development so much easier!
Installation
If you want to use this extension, you need to add the io.quarkiverse.primefaces:quarkus-primefaces extension first to your build file.
For instance, with Maven, add the following dependency to your POM file:
<dependency>
<groupId>io.quarkiverse.primefaces</groupId>
<artifactId>quarkus-primefaces</artifactId>
<version>4.16.0</version>
</dependency>
<dependency>
<groupId>io.quarkiverse.primefaces</groupId>
<artifactId>quarkus-primefaces-extensions</artifactId>
<version>4.16.0</version>
</dependency>
Getting Started
The extension ships a Codestart that scaffolds a
runnable Faces application, so you do not have to write web.xml and faces-config.xml by hand.
Using the Quarkus CLI:
quarkus create app org.acme:primefaces-app --extension=io.quarkiverse.primefaces:quarkus-primefaces:4.16.0
Or with Maven:
mvn io.quarkus.platform:quarkus-maven-plugin:create \
-DprojectGroupId=org.acme -DprojectArtifactId=primefaces-app \
-Dextensions=io.quarkiverse.primefaces:quarkus-primefaces:4.16.0
The generated project contains:
| File | Purpose |
|---|---|
|
Faces servlet mapping, welcome file, error pages and sensible PrimeFaces/MyFaces context parameters, including |
|
The PrimeFaces Dialog Framework, exception handler factory and client window factory. |
|
A sample page with a form, a |
|
The Facelets template shared by |
|
A |
A Quarkus application is packaged as a jar and not a war, so the descriptors live under
META-INF rather than WEB-INF.
|
Start it with quarkus dev and browse to http://localhost:8080/index.xhtml.
Only quarkus-primefaces provides a Codestart. Adding quarkus-primefaces-extensions to the
same command will not generate a second, conflicting set of descriptors.
|
Limitations
When creating a GraalVM Native image you may need to change some of your code to be native friendly and some features may not be available to use in Native mode.
| FeedReader not supported. Rome library uses JDOM XML parsing and we did not spend the time to investigate for a lightly used component. |
| EL expressions which use reflection may run into issues with things like List size() or Enum name() as they are not bean compliant method names. You might need to change your EL expression or add helper code to achieve what you want. |