How about org.apache.wicket.markup.html.body.BodyTagAttributeModifier?

hth,
  Gerolf
Already tried it, the name sounds right, but it seems to be a helper for Panels in some way, I don't fully understand the javadoc:


         "org.apache.wicket.markup.html.body.BodyTagAttributeModifier

An attribute modifier specifically for body tags.

Panels have associated markup files and if they contain |<wicket:head>| and |<body onLoad="...">| then the body's |onLoad| attribute will be appended to the page's onLoad attribute. That accretion happens by means of an AttributeModifier which the Panel adds to the body container. In the case where the Panel is removed or replaced, then the AttributeModifier must be removed or at least disabled. That exactly is what this special purpose AttributeModifier does, i.e. it disables itself if the owner component (Panel) is removed or replaced."

Doesn't seem to be the right one..

-- Edvin

On Nov 23, 2007 7:05 PM, Edvin Syse <[EMAIL PROTECTED]> wrote:

John Krasnay skrev:
On Fri, Nov 23, 2007 at 05:05:51PM +0100, Edvin Syse wrote:

John Krasnay wrote:

Perhaps there's another way to solve your problem. Why are you
modifying
the class of <body>? To change it's styling? Why not instead split
your
styles into different stylesheets and conditionally include the right
one using a header contribution from the child page?


I'm developing a virtualhosted CMS-system, so in this case that won't
be
possible or at least not intuitive to the user. The user can edit the
head section for each page, and also a global head section that are
both
contributed. Some users want's to lay out components differently
depending on the page and setting a class on the body gives them an
easy
way of controlling that.


Well, now you're outside my Wicket comfort zone :-(

Arghfl.. the PHP-guys at work is gonna have a feast with me not beeing
able to change the <body> element.. hehe :)

But maybe it is possible to hook into the onComponentTag method for the
<body> element when it is rendered? I guess it is treated specially
somewhere deep inside the Wicket internals, but I can't locate it. Can
anyone help?

-- Edvin


Reply via email to