/** repeater with a panel inside */ @Test public void repeater3() { TestPage p = new TestPage(); p.setPageMarkup( "<p wicket:id='a'><p wicket:id='lv'><p wicket:id='b'><p wicket:id='q'></p></p></p></p>"); MarkupContainer a = new A(); LV l = new LV(3) { @Override protected void populateItem(ListItem<Integer> item) { TestPanel q = new TestPanel("q"); q.setPanelMarkup( "<wicket:panel><p wicket:id='r'><p wicket:id='s'></p></p></wicket:panel>"); q.queue(new R(), new S()); item.queue(q, new B()); } }; p.queue(a, l); tester.startPage(p); assertThat(l.size(), is(3)); for (Component item : l) { assertThat(p, hasPath(new Path(a, l, item, new B()).add("q").add(new R(), new S()))); } }
@Test public void repeater1() { TestPage p = new TestPage(); p.setPageMarkup("<p wicket:id='lv'><p wicket:id='b'><p wicket:id='c'></p></p></p>"); LV l = new LV(3) { @Override protected void populateItem(ListItem<Integer> item) { item.queue(new B(), new C()); } }; p.queue(l); tester.startPage(p); assertThat(l.size(), is(3)); for (Component item : l) { assertThat(p, hasPath(new Path(l, item, new B(), new C()))); } }
/** Inits the dialog. */ @Override protected void initDialog() { super.initDialog(); enableComponentsLater(new JComponent[] {}); }