Font Awesome version is outdated

Post Reply
mishu12
Posts: 1
Joined: 06 Apr 2021, 07:02

06 Apr 2021, 07:10

In Primefaces 7.0.1 when i set the web.xml configuration to:

<context-param>
<param-name>primefaces.FONT_AWESOME</param-name>
<param-value>true</param-value>
</context-param>

Only the old fontawesome version 4.7.0 will be used which is using
elements which are no longer available/supported in the
latest version which is currently 5.8.1.
Also the tag's are no longer equal because they have been changed:
Instead of "fa fa-trademark" you have now write "fas fa-trademark" ...

I am always using the latest version of font-awesome by
redirecting it to the latest by using omnifaces CDN Resource Handler:

<context-param>
<param-name>org.omnifaces.CDN_RESOURCE_HANDLER_URLS</param-name>
<param-value>
primefaces:fa/font-awesome.css=https://use.fontawesome.com/releases/v5.8.1/css/all.css
</param-value>
</context-param>

more information click here

siris
Posts: 322
Joined: 29 Jul 2019, 13:57

22 Apr 2021, 15:38

Hi,

Turn default PF support OFF in web.xml:

Code: Select all

<context-param>
     <param-name>primefaces.FONT_AWESOME</param-name>
     <param-value>false</param-value>         
</context-param>
Update your pom.xml.

Code: Select all

<dependency>
     <groupId>org.webjars</groupId>
     <artifactId>font-awesome</artifactId>
     <version>5.8.2</version>
</dependency>
Use the proper WebJars CSS for JSF.

Code: Select all

<h:outputStylesheet library="webjars" name="font-awesome/5.8.2/css/all.min-jsf.css" />
<h:outputStylesheet library="webjars" name="font-awesome/5.8.2/css/v4-shims.min-jsf.css" />
NOTE: You will have to change your "fa" as now Font Awesome has separated into different categories like"fas" "fab" etc.
Please see the documentation: https://fontawesome.com/how-to-use/on-t ... /basic-use

Best Regards,

Post Reply

Return to “PrimeFaces Theme Designer API”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 7 guests