public abstract class MyPage extends WebPage { public MyPage() { add(createMyDiv("myDiv")); }
public abstract Component createMyDiv(String markuId); } public MyConcretePage extends MyPage { public createMyDiv(String markupId) { return new Label(markupId); } } Am Montag, 25. Januar 2010 11:24:55 schrieb Wilhelmsen Tor Iver: > > So in my parent html : > > <body> > > <span wicket:id="myDiv"></span> > > <div wicket:id="myNewPanel"></div> > > <div wicket:id="myNewPanel2"></div> > > </body> > > > > And add a label with id "myDiv" in related parent java. This part is > > common to all classes. > > > > But when I render the TestFormOne, that doesn't work because, > > apparently the label "myDiv" must be define in subclass. > > You should add a default component for it in the parent class then use > replace() in subclasses as needed. > > - Tor Iver > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > -- binaere bauten gmbh · tempelhofer ufer 1a · 10961 berlin +49 · 171 · 9342 465 Handelsregister: HRB 115854 - Amtsgericht Charlottenburg Geschäftsführer: Dipl.-Inform. Ilja Pavkovic, Dipl.-Inform. Jost Becker --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org