For native JSF tags, setting the "class" attribute performs as you'd
expect; however, in user-defined tags, setting the "class" attribute
results in the exception

java.lang.IllegalArgumentException: Component property class is not
writable

Which is how we've behaved traditionally; using the "styleClass" attribute
instead does work as expected.

Mojarra supports setting the "class" attribute as of 2.2.9.  Additionally,
the same issue was fixed in MYFACES-3874 for jsf:class.  Would it be
worthwhile for us to change the behavior of MyFaces here for custom
components - that is, allow them to set a "class" attribute?  (I've tested
a change that's fairly trivial, along the lines of the fix in
MYFACES-3874).

Regards,

Bill Lucy
wtl...@us.ibm.com

Reply via email to