1

i need to use a custom icon (from flaticons) in my p:commandButton. Its supposed to look like any icon from primefaces itself. I have to use custom icons due to Primfaces limited selection and i have no idea how. Thanks in advance!

6
  • 1
    what have you tried so far? Commented May 21 at 13:22
  • 1
    why not use FontAwesome free icons they are supported by Primefaces out of the box and you can just do icon="fa fa-gear" and it just works. Commented May 24 at 15:24
  • @Asgar ive tried using h:commandButton with image attribute, h:link with image, but neither work like the p:commandButton does. Commented Jun 18 at 10:23
  • 1
    @Melloware thats a very good idea, thanks, it solves most of my icon issues, tho icos that are selfmade are still not supported. (youre a legend btw), additionally its expensive for most icons i need PRO Commented Jun 18 at 10:25
  • ahhh yeah i get away with FREE as it has a lot but not all. Understood. If you use another font library you just need to look at the PF CSS how it handles fa and do the same for your custom ico moon or other font lib. Commented Jun 19 at 15:06

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.