Thanks for giving the best overview of my thoughts Igor. Are you reading my mind?
On Nov 7, 2007 3:50 PM, Igor Vaynberg <[EMAIL PROTECTED]> wrote: > let me weigh in with my thoughts on this. > > a big problem with markup inheritance is the possibility of id collissions > > for example > > class basepage extends webpage { > public basepage() { > add(new label("label")); > } > } > > class concretepage extends basepage { > public concretepage() { > add(new label("label")); > } > } > > basepage: <body><div wicket:id="label"></div><wicket:child></body> > concretepage: <wicket:extend><div wicket:id="label"></div></wicket:extend> > > now what you are proposing here makes this collission possibility > significantly higher because essentially i CANNOT even have something > like this: > > <wicket:implements id="foo1"><div wicket:id="label"></wicket:implements> > <wicket:implements id="foo2"><div wicket:id="label"></wicket:implements> > > even though to me it looks like the nasting of foo1 and foo2 are > seperate so i should be able to have a direct child with the same id > in both....but i cannot. > > a lot of people are saying that this can be implemented with panels, > and that is true. but actually implementing this with fragments will > make it look very similar to this new strategy and does not have the > id collission problem, because components ARE nested in two different > containers: > > class basepage extends webpage { > Fragment templateFoo1(String id) { return new emptyfragment(id); } > Fragment templateFoo2(String id) { return new emptyfragment(id); } > } > > <wicket:fragment wicket:id="foo1"><div > wicket:id="label"></wicket:fragment> > <wicket:fragment wicket:id="foo2"><div > wicket:id="label"></wicket:fragment> > > thoughts? > > -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] > > -- Bruno Borges blog.brunoborges.com.br +55 1185657739 "The glory of great men should always be measured by the means they have used to acquire it." - Francois de La Rochefoucauld