myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Kienenberger <>
Subject Re: Setting the "class" Attribute for Custom Tags
Date Wed, 17 Jun 2015 22:07:26 GMT

I'm responding to your message on the dev mailing list.  I'm hoping
you're also subscribed to that list.

Your proposal sounds fine to me.   If it's controversial in any way,
we can make the behavior configurable via a context-param in the
web.xml file.

Please open an issue and attach a patch with the change.  If at all
possible, please include a test as well.

I don't know if this is related, but one of my co-workers hit a
problem with "class" in EL under tomcat this week.  Turns out that EL
doesn't support a property name that is the same as a java keyword.
This might be a rabbit trail though as I'm not sure that EL is
involved at the component property level.

Current Page Class    : #{}

The exception (which may only apply to tomcat servers) is:

javax.el.ELException: The identifier [class] is not a valid Java
identifier as required by section 1.19 of the EL specification
(Identifier ::= Java language identifier). This check can be disabled
by setting the system property
org.apache.el.parser.SKIP_IDENTIFIER_CHECK to true.

On Wed, Jun 17, 2015 at 4:55 PM, William Lucy <> wrote:
> 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

View raw message