I'm a bit confused to not find anything here, how to use PrimeIcons of PrimeFaces. I just wanted to use the icon of an PrimeFaces example:
<p:contextMenu for="table">
<p:menuitem value="Löschen" update="table" icon="pi pi-times" action="#{telefonbuchList.deleteEntry}"/>
</p:contextMenu>
The "pi pi-times". Instead I just get a ^. I don't even want to use FontAwesome and this stuff right now. I thought the icons are already implemented with the dependency of PrimeFaces, but I seem to be wrong.
First... you must be using PF 6.2.11 or 7.0 or higher: https://github.com/primefaces/primefaces/issues/4228
Second you add this to your XHTML:
<h:outputStylesheet name="primeicons/primeicons.css" library="primefaces"/>
Update 03/16/2021: Starting with PrimeFaces 10.0.0 PrimeIcons is automatically added to all pages.
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