as others have stated, wicket:extend and wicket:child are used to work in
conjunction with class heiararchies. so since you only have one superclass
you only have one wicket:child.
however, none of the stuff that implements this uses any private api. you
can create your own markup filters and class resolvers and tags that work
the way you want. if it works out great we can include it into core if you
want to donate.
-igor
On 5/17/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