Page 1 of 1

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

Posted: 17 Jun 2015, 09:53
by haos1981
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.

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

Posted: 17 Jun 2015, 12:59
by T.dot
Use styleClass="..." instead of class="..."

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

Posted: 17 Jun 2015, 15:45
by aragorn
T.dot wrote:Use styleClass="..." instead of class="..."
+1

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

Posted: 19 Jun 2015, 22:25
by haos1981
Thanks for your help, it worked correctly.

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

Posted: 22 Jun 2015, 20:13
by cagatay.civici
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.