mb.add(add(new Label("label","content..."))); why are there two adds there?
-igor On Tue, Feb 16, 2010 at 6:06 AM, marioosh.net <marioosh....@gmail.com> wrote: > I have problem with Border. When i open Lesson2 page, i get nothing. > System.out.println(mb); show: [MarkupContainer [Component id = border]]. > Anybody help? Sources below. > > MainBorder.java: > public class MainBorder extends Border { > public MainBorder(String id) { > super(id); > add(new AjaxLink("lesson0"){ > �...@override > public void onClick(AjaxRequestTarget target) { > setResponsePage(Lesson0.class); > } > > }); > add(new AjaxLink("lesson1"){ > �...@override > public void onClick(AjaxRequestTarget target) { > setResponsePage(Lesson1.class); > } > }); > } > } > > MainBorder.html: > <wicket:border> > <div style="background-color: silver; padding: 5px;"> > <a href="#" wicket:id="lesson0">Lesson1</a> | > <a href="#" wicket:id="lesson1">Lesson2</a> | > </div> > <wicket:body/> > </wicket:border> > > BasePage.java: > public class BasePage extends WebPage { > protected MainBorder mb; > public BasePage() { > mb = new MainBorder("border"); > add(mb); > } > } > > BasePage.html: > [empty] > > Lesson2.java: > public class Lesson2 extends BasePage { > public Lesson2() { > System.out.println(mb); > mb.add(add(new Label("label","content..."))); > } > } > > Lesson2.html: > <div wicket:id="border"> > <span wicket:id="label">content</span> > </div> > > -- > Greeting, > marioosh > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org