Thanks for that awesomely fast reply!
I found an excellent thread in the archives that explains this topic very well - I swear I searched before, but obviously with the wrong keywords ;) http://www.nabble.com/Multiple-wicket%3Achild-tags-in-the-same-page-tf3775143.html To sum it up for those that came across this thread looking for the same answer: there are two different solutions to this kind of problem: 1. without child-extends-tags using "abstract tags" like this: BasePage() { // maybe you want to doublecheck if the returned component has the expected id add(createComponent("left"); add(createComponent("right"); } abstract Component createComponent(String id) 2. using child-extends-tags using fragments in the html of the subclass The obvious disadvantage of the latter is its need for a html page for every page you create. If you only want to add 2 existing panels (or components), you will find yourself copying a template page over and over again that only has two fragments, each with a <wicket:component />. Its advantage is, that one can have the contents of both columns on the same page, which is convenient if there is some JS "interaction" between both panels ... of if your html/css designer needs to have both on the same page for proper validation. Multiple child/extends pairs (where you have to see such a pair as an abstract method rather than a baseclass/subclass relationship) could help to combine the advantages of both approaches. However, its not a feature that would improve wickets functionality and probably not worth the effort of implementing it ... though it might be convenient. I hope I got it right. Best regards, ---- Stefan Fußenegger http://talk-on-tech.blogspot.com // looking for a nicer domain ;) igor.vaynberg wrote: > > this has been discussed multiple times on this list, search the > archives. the conclusion has always been that what you want can be > accomplished by factory methods on the basepage that generate panels. > > -igor > > > On 11/2/07, Stefan Fußenegger <[EMAIL PROTECTED]> wrote: >> >> Hi folks, >> >> I just stumbled on a situation where it would be useful to have two or >> more >> <wicket:child /> tags in a base page. Just consider a layout that >> consists >> of the usual footer, header, navigation, and content parts. But now, the >> content should be arranged in two columns, e.g. two different <div />s. >> >> To give a short example, the BasePage.html cloud look like this >> >> -------- >> <body> >> >> <!-- some layout markup --> >> >> <div class="content_left"> >> <wicket:child /> >> </div> >> >> <!-- more layout markup --> >> >> <div class="content_rigt"> >> <wicket:child /> >> </div> >> >> <!-- even more layout markup --> >> </body> >> -------- >> >> And the Child.html markup would look like this: >> >> -------- >> <body> >> >> <div class="content_left"> >> <wicket:extend> >> <!-- content of left column (first child) goes here --> >> </wicket:extend> >> </div> >> >> <div class="content_rigt"> >> <wicket:extend> >> <!-- content of right column (second child) goes here --> >> </wicket:extend> >> </div> >> </body> >> -------- >> >> Wouldn't that be a desirable feature? I tried to run the above example >> expecting to get an exception. The second wicket:child/wicket:extend pair >> was happily ignored though. >> >> Best regards, Stefan >> -- >> View this message in context: >> http://www.nabble.com/Multiple-%3Cwicket%3Achild--%3E-tags-on-a-single-base-page--tf4738673.html#a13551448 >> Sent from the Wicket - User mailing list archive at Nabble.com. >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Multiple-%3Cwicket%3Achild--%3E-tags-on-a-single-base-page--tf4738673.html#a13553489 Sent from the Wicket - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]