use of org.apache.wicket.markup.html.panel.InlinePanelPage_1 in project wicket by apache.
the class MarkupFragmentTest method fragments.
/**
* @throws Exception
*/
@Test
public void fragments() throws Exception {
Page page = new InlinePanelPage_1();
Fragment fragment = (Fragment) page.get("myPanel1");
// Get the associated markup file
IMarkupFragment markup = fragment.getAssociatedMarkup();
assertNull(markup);
// getMarkup() returns the "calling" tags
markup = fragment.getMarkup();
compareMarkupWithString(markup, "<span wicket:id=\"myPanel1\">panel</span>");
// getMarkup(null) returns the markup which is used to find a child component
markup = fragment.getMarkup(null);
compareMarkupWithString(markup, "<wicket:fragment wicket:id=\"frag1\">panel 1</wicket:fragment>");
}
Aggregations