You can also use an AttributeModifier, which will give you the old value (as
I recall).

overriding the method onComponentTag(ComponentTag tag), will let you easily
put a new variable for your class etc... but you will need to use tag.get(),
and tag.put(tag.get("")+"..."). Looks somewhat messy when you start using
StringBuffers, unless your doing a lot of tag modifications might as well
use AttributeModifier.

In fact use, SimpleAttributeModifier:

component.add(new SimpleAttributeModifier("class", "my-css-class"));

More methods can be seen here:

View this message in context:
Sent from the Users forum mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

Reply via email to