AttributeAppender seems to be ignored in AbstractAjaxBehavior.onComponentTag

2015-01-27 Thread Thorsten Schöning
Hi all, I have a class extending AbstractAjaxBehavior and overriding onComponentTag(ComponentTag tag), because I need a custom css class added. I thought this would be an easy task by simply adding an AttributeAppender like the following: tag.addBehavior(AttributeModifier.append(class,

Re: AttributeAppender seems to be ignored in AbstractAjaxBehavior.onComponentTag

2015-01-27 Thread Sven Meier
Hi Thorsten, adding a behavior to the tag is nothing you would want to do in your behavior, because it's too late to have any effect on the current rendering (see Component#renderComponentTag()). Behaviors on markup tags are meant to be used to alter the markup independent of any component,