You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by John <jd...@gmail.com> on 2009/06/24 06:54:43 UTC
Adding attribute to body tag
Hi,
I need to add a class attribute to the body tag but this:
component.add(new AttributeAppender("class", true, Model.of("yui-skin-
sam"), " "));
... and this ...
component.add(new BodyTagAttributeModifier("class", true,
Model.of("yui-skin-sam"), component));
are not working. Is there a new way to do this?
Thanks,
John
Re: Adding attribute to body tag
Posted by John Patterson <jd...@gmail.com>.
I can see what I was doing wrong now. I simply needed to add a wicket:id
attribute to the body and create a webmarkup container for the body tag.
For some unknown reason I assumed the body tag was already attached to the
Page.
JD
--
View this message in context: http://www.nabble.com/Adding-attribute-to-body-tag-tp24178694p24195461.html
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Adding attribute to body tag
Posted by John Patterson <jd...@gmail.com>.
Martin Funk-3 wrote:
>
>
> not to my knowledge & it works in trunk just like that.
>
>
I have trunk and still cannot add an attribute to the body tag.
In my page constructor I have
add(new BodyTagAttributeModifier("class", Model.of("johniscool"), this));
but the attribute modifier is not even being run - when I put a break point
in the behaviours onComponentTag is is never hit.
I must be missing something.
--
View this message in context: http://www.nabble.com/Adding-attribute-to-body-tag-tp24178694p24195360.html
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Adding attribute to body tag
Posted by Martin Funk <ma...@googlemail.com>.
Am 24.06.2009 um 06:54 schrieb John:
> Hi,
>
> I need to add a class attribute to the body tag but this:
>
> component.add(new AttributeAppender("class", true, Model.of("yui-
> skin-sam"), " "));
>
> ... and this ...
>
> component.add(new BodyTagAttributeModifier("class", true,
> Model.of("yui-skin-sam"), component));
>
> are not working. Is there a new way to do this?
not to my knowledge & it works in trunk just like that.
mf
>
> Thanks,
>
> John
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org