I attempted to create a new icon for my p:commandButton
, but unfortunately, I was unsuccessful. I followed the method outlined in this helpful link:
PrimeFaces: how can I make use of customized icons?
However, this approach did not work for me. Below is the code I used:
CSS CODE :
.img-button-help { background-image: url('img/mag.ico') !important; }
JSF CODE :
<p:commandButton icon="img-button-help" value="test" />
Result: The outcome ->
How do I implement custom icons in Primefaces?