Jens, Your super class could declare an abstract protected void getThatPanelIWantSometimes() method that the children can then implement to return whatever they like and then the ball's back in the parent's court.
Regards - Cemal jWeekend OO & Java Technologies, Wicket Training and Development http://jWeekend.com mcbain wrote: > > Hi experts, > > I have a Page class with serves as base html-template for the derived > pages. (e.g. http://www.javalobby.org/java/forums/t69357.html) > For some special needs, subclass-markup should be placed in some element > managed by wicket and not at the root. > > base.html > <body> > <div wicket:id="superDiv"> > <wicket:child/> > </div> > </body> > > My workaround currently is, that the Base-class provides a getSuperDiv() > method, wich must be used from > the subpages to add their content to. > > SubPage(String) { > super(...); > > // NOW, wrong: add( new Label("hello","Hello")); > > // CORRECT > getSuperDiv().add( new Label("hello","Hello")); > } > > Anybody, knows some more clean solution to this? > Maybe the root-Container for the subpages can be set somehow. > > Thanks > Jens > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > > -- View this message in context: http://www.nabble.com/Page-inheritance-problem-tp25776777p25776824.html Sent from the Wicket - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
