It is not possible in wicket... 
You can have at most one wicket:child tag per page... 
This is because Java does not support multiple inheritance...
This question has been posted on the mailing list earlier. Give a search to
find out more about this subject.


Chris Colman 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">
> 
>                   
> 
>                   <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>
> 
>                             
> 
>                   </div>
> 
>               </div>
> </body>
> 
> Markup for the derived page:
> 
> <body>
>               <wicket:extend>
>                       <div id="maincol">
>                           
>                       </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
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Multiple-wicket%3Achild-tags-in-the-same-page-tf3775143.html#a10676923
Sent from the Wicket - User mailing list archive at Nabble.com.


-------------------------------------------------------------------------
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

Reply via email to