You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Vadim Tesis <va...@hotmail.com> on 2007/10/14 20:25:05 UTC
body tag attributes
all,
is there a way to dynamically add attributes to the body tag in wicket
1.3.0?
i'm using templates to create the pages. so there's a base page which uses
wicket:child tag to display contents of child pages. i'd like to be able to
dynamically modify 'id' attribute of body tag on the base page depending on
which child page gets instantiated, sort of like replacing the title of the
base page with wicket:head tag.
i've tried to use BodyTagAttributeModifier, but for some reason it didn't
add id attribute to body tag.
i saw a thread on replacing HtmlBodyContainer with a custom one in
onAttach() method of a page. but when i did that, i got an exception saying
that component hierarchy cannot be modified. and i cannot override
internalOnAttach() method since it's final.
Thanks,
Vadim
_________________________________________________________________
i'm making a difference. Make every IM count for the cause of your choice.
Join Now. http://im.live.com/messenger/im/home/?source=TAGHM
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: body tag attributes
Posted by Igor Vaynberg <ig...@gmail.com>.
what kind of attribute are yo talking about? wicket has great support for
onload/etc events that are better then adding onload to the body.
-igor
On 10/14/07, Vadim Tesis <va...@hotmail.com> wrote:
>
> all,
>
> is there a way to dynamically add attributes to the body tag in wicket
> 1.3.0?
>
> i'm using templates to create the pages. so there's a base page which
> uses
> wicket:child tag to display contents of child pages. i'd like to be able
> to
> dynamically modify 'id' attribute of body tag on the base page depending
> on
> which child page gets instantiated, sort of like replacing the title of
> the
> base page with wicket:head tag.
> i've tried to use BodyTagAttributeModifier, but for some reason it didn't
> add id attribute to body tag.
> i saw a thread on replacing HtmlBodyContainer with a custom one in
> onAttach() method of a page. but when i did that, i got an exception
> saying
> that component hierarchy cannot be modified. and i cannot override
> internalOnAttach() method since it's final.
>
> Thanks,
> Vadim
>
> _________________________________________________________________
> i'm making a difference.Make every IM count for the cause of your choice.
> Join Now. http://im.live.com/messenger/im/home/?source=TAGHM
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>