I am trying to use fontawesome 5.15.0 with primefaces 8.0 and the icons are not rendered in the command button.
in web.xml
<context-param>
<param-name>primefaces.FONT_AWESOME</param-name>
<param-value>false</param-value>
</context-param>
in xhtml page
<h:outputStylesheet library="webjars" name="font-awesome/5.15.0/css/all-jsf.css" />
<h:outputStylesheet library="webjars" name="font-awesome/5.15.0/css/v4-shims.min-jsf.css" />
in pom.xml
<dependency>
<groupId>org.webjars</groupId>
<artifactId>font-awesome</artifactId>
<version>5.15.0</version>
</dependency>
in command button using fa fa-unlock-alt or fas fa-unlock-alt both don't work...
<p:commandButton value="Acessar" icon="fa fa-unlock-alt"
ajax="false" action="#{loginController.login()}"
styleClass="btn btn-teal btn-block" />
but <i class="fas fa-user"></i> work!!
Note i'm using Adminfaces(https://github.com/adminfaces) with primefaces 8.0

Does anyone know the solution?
Thanks!
I have found the solution...
the primefaces.FONT_AWESOME need be true...
<context-param>
<param-name>primefaces.FONT_AWESOME</param-name>
<param-value>true</param-value>
</context-param>
css imports:
<h:outputStylesheet library="webjars" name="font-awesome/5.15.3/css/solid.min-jsf.css" />
<h:outputStylesheet library="webjars" name="font-awesome/5.15.3/css/fontawesome.min-jsf.css" />
<h:outputStylesheet library="webjars" name="font-awesome/5.15.3/css/v4-shims.min-jsf.css" />
in the commandButtons must be "fa fa-...." fas fa-... not work...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With