John Krasnay wrote:
On Fri, Nov 23, 2007 at 04:24:21PM +0100, Edvin Syse wrote:
The <body> tag from your subpage is discarded. The <body> tag that is
rendered comes from some parent page. One way to do this would be to
attach a WebMarkupContainer to the <body> tag in the parent page and
expose it via a getter:
I really want to avoid this, as it seems messy having to add all
components to the body markupcontainer. I can't believe this is the
Wicket way to solve this problem :)
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.
-- Edvin