This question does come up quite a bit on the list, though. I admit thinking the same thing when I was coming to grips with Wicket not so long ago. I think the problem is not that markup extension is hard to understand, but rather that it's very intuitive, so much so that new Wicket users want to use it to solve related problems.
jk On Fri, May 18, 2007 at 06:37:11AM -0700, Alex Objelean wrote: > > You should read <wicket:child> tag as extends keyword... This way wicket > works. Why are you looking for different solution when there are many more > which works great? > > > Chris Colman wrote: > > > >> As Alex says, wicket:child tags can't solve this because that's not > >> the way they're intended to be used. > > > > I can't see why wicket could not be easily enhanced to support multiple > > overridden child sections. Just like the astract methods of a class - > > there is no limit on the number of them: a class can have any number > > abstract methods and they can be overridden by any derived class - not > > just immediate descendents and they don't have to all be overridden in > > the same class - just so long as an implementation is provided somewhere > > in the inheritance hierarchy for any concrete class. > > > > In wicket the <wicket:child> is just a placeholder for content that will > > be implemented/provided in a derived class. It just seems strange that > > the number of possible placeholders, n, was arbitrarily set to n = 1 in > > the architecture. > > > > Having only 1 alleviates the need to identify the placeholder in a > > derived class but that is the only reason I can see why the maximum > > number of placeholders should have been limited to just 1. > > > > I can see many uses for providing implementations of different child > > sections at different levels of the hierarchy. You could have navigation > > column, main column and footer being child sections. With a deep > > hierarchy you could provide 'extend' sections that provide the content > > for the child sections at various points in the hierarchy. You might > > provide footer markup via one common base class and then in classes that > > extend that class provide different navigation and main column markup > > but they all share a common footer. Another class might provide a > > different footer and have other classes extending it that provide > > different navigation and main column markup. > > > > For backwards compatibility with the current system you could say that > > if there is only one child section then no label is required but if you > > choose to add more than one child section then you must label them (just > > like providing an abstract method signature). > > > > ------------------------------------------------------------------------- > > 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#a10682394 > 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 ------------------------------------------------------------------------- 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