image not shown in <p:commandButton

UI Components for JSF
Post Reply
georgef
Posts: 3
Joined: 25 Jul 2010, 12:53

06 Sep 2010, 16:16

Hello...
This is my first post in the forum as I'm quite new in using primefaces.
My problem is that when I'm trying to put an icon in <p:commandButton it doesn't show it
here is my line of code
<p:commandButton value="addToCart" image="images/icons/cart.jpg" style="margin-left: 50px"/>
I would appreciate any help

thanks in advance...

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

06 Sep 2010, 16:22

Welcome,

See user's guide to see how icons are applied, you need to provide it via a style class actually.

georgef
Posts: 3
Joined: 25 Jul 2010, 12:53

09 Sep 2010, 16:31

Ok I finally managed to do that.
Thanks a lot for your help!

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 66 guests