As Alex says, wicket:child tags can't solve this because that's not the way they're intended to be used.
There are various ways to solve the problem, though: you could place the common content into a Panel, have a method on the base page return this panel, and then include it as normal on your child pages; or restructure your child pages so the "before" and "after" content exists in panels, have two abstract methods on the base page that return these panels, then the base page can obtain and add the content itself. I expect you could do something with fragments as well, but I haven't looked into them! Charlie. On 5/18/07, Chris Colman <[EMAIL PROTECTED]> wrote: > Let's say I have a page which can be almost completely marked up in a > base class markup. There are only two sections of the page that change > in the derived pages/classes. Is it possible to use the <wicket:child> > tag twice in > the one page and then have two <wicket:extend> tags in the derived > pages? > > Markup for base page: > > <body> > <div id="master"> > > <span wicket:id="organizationHeader"/> > > <div id="bodywrap"> > > <wicket:child> > </wicket:child> > > <p>The stuff in here is common to all > pages and so I only want to define it once in this base page markup</p> > > <wicket:child> > </wicket:child> > > <span wicket:id="organizationFooter"/> > > </div> > > </div> > </body> > > Markup for the derived page: > > <body> > <wicket:extend> > <div id="maincol"> > <span wicket:id="welcomePanel"/> > </div> > </wicket:extend> > > This text is ignored - only the extend parts will be > used > > <wicket:extend> > <h1>Hi there!</h1> > </wicket:extend> > </body> > > I've tried this and I get the following error message: > > WicketMessage: The component [MarkupContainer [Component id = _child, > page = com.sas.av.ui.wicket.HomePage, path = > 4:_<body>:_child.MarkupInheritanceResolver$TransparentWebMarkupContainer > , isVisible = true, isVersioned = true]] has the same wicket:id as > another component already added at the same level > > Root cause: > > wicket.markup.MarkupException: The component [MarkupContainer [Component > id = _child, page = com.sas.av.ui.wicket.HomePage, path = > 4:_<body>:_child.MarkupInheritanceResolver$TransparentWebMarkupContainer > , isVisible = true, isVersioned = true]] has the same wicket:id as > another component already added at the same level > at wicket.Page.componentRendered(Page.java:936) > at wicket.Component.rendered(Component.java:1755) > at wicket.Component.render(Component.java:1534) > at wicket.MarkupContainer.renderNext(MarkupContainer.java:1334) > at > wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:982) > at wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:917) > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user