<p:commandButton do not work with class="anything"

Locked
haos1981
Posts: 10
Joined: 04 Mar 2015, 23:38

17 Jun 2015, 09:53

when a <p:commandButton have in the class something do not work and get this error:

javax.servlet.ServletException: Setter not found for property class
java.lang.IllegalArgumentException: Setter not found for property class

and if you remove the class "" sticker it works well but would not have the css styles in the <p:commandButton.

User avatar
T.dot
Expert Member
Posts: 617
Joined: 01 Feb 2012, 15:39
Location: Vienna/Austria

17 Jun 2015, 12:59

Use styleClass="..." instead of class="..."

User avatar
aragorn
Posts: 3641
Joined: 29 Jun 2013, 12:38

17 Jun 2015, 15:45

T.dot wrote:Use styleClass="..." instead of class="..."
+1

haos1981
Posts: 10
Joined: 04 Mar 2015, 23:38

19 Jun 2015, 22:25

Thanks for your help, it worked correctly.

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

22 Jun 2015, 20:13

There was a typo on our end in dashboard sample, it should be styleClass. New versions of JSF impls convert it to styleClass automatically, old versions just throw this exception.

Locked

Return to “Rio”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest