Package org.apache.wicket.markup.html.panel

Examples of org.apache.wicket.markup.html.panel.Panel$PanelMarkupHelper


  @Test
  public void nestedPanels()
  {
    MarkupContainer r = new R(), s = new S();

    Panel innerPanel = new InnerPanel("inner");
    innerPanel.queue(s);

    Panel outerPanel = new OuterPanel("outer");

    outerPanel.queue(r, innerPanel);

    TestPage p = new TestPage();
    p.setPageMarkup("<html><head></head><body><p wicket:id='outer'></p></body></html>");
    p.queue(outerPanel);
View Full Code Here


  /** */
  @Test
  public void idGeneratedWhenPanelNotAddedToPage()
  {
    // In wicket 1.4 the following sequence would not cause an exception
    Panel panel = new EmptyPanel("bla");

    // however in 1.5 the following statement generated a WicketRuntimeException
    // that the markup type could not be determined
    String markupId = panel.getMarkupId();

    // instead 1.4 would just generate the missing markup identifier
    Assert.assertEquals("bla1", markupId);
  }
View Full Code Here

    Label label = (Label)tester.getLastRenderedPage().get("myLabel");
    assertNotNull(label);
    assertTrue(document.contains("<span wicket:id=\"myLabel\">Test Label</span>"));

    Panel panel = (Panel)tester.getLastRenderedPage().get("myPanel");
    assertNotNull(panel);
    assertTrue(document.contains("<wicket:panel>Inside the panel<span wicket:id=\"label\">mein Label</span></wicket:panel>"));

    label = (Label)tester.getLastRenderedPage().get("myPanel:label");
    assertNotNull(label);
View Full Code Here

    String document = tester.getLastResponseAsString();
    Label label = (Label)page.get("myLabel");
    assertNotNull(label);
    assertTrue(document.contains("<span wicket:id=\"myLabel\">Test Label</span>"));

    Panel panel = (Panel)page.get("myPanel");
    assertNotNull(panel);
    assertTrue(document.contains("<wicket:panel>Inside the panel<span wicket:id=\"label\">mein Label</span></wicket:panel>"));

    label = (Label)page.get("myPanel:label");
    assertNotNull(label);
View Full Code Here

    assertNotNull(label);
    ValueMap attr = label.getMarkupAttributes();
    assertNotNull(attr);
    assertEquals("myLabel", attr.getString("wicket:id"));

    Panel panel = (Panel)page.get("myPanel");
    assertNotNull(panel);
    attr = panel.getMarkupAttributes();
    assertNotNull(attr);
    assertEquals("myPanel", attr.getString("wicket:id"));

    label = (Label)page.get("myPanel:label");
    assertNotNull(label);
View Full Code Here

   *            a <code>Panel</code> factory that creates test <code>Panel</code> instances
   * @return a rendered <code>Panel</code>
   */
  public final Panel startPanel(final ITestPanelSource testPanelSource)
  {
    Panel panel = (Panel)startPage(new ITestPageSource()
    {
      private static final long serialVersionUID = 1L;

      public Page getTestPage()
      {
View Full Code Here

   *            a test <code>Panel</code> class with <code>Panel(String id)</code> constructor
   * @return a rendered <code>Panel</code>
   */
  public final <C extends Panel> Panel startPanel(final Class<C> panelClass)
  {
    Panel panel = (Panel)startPage(new ITestPageSource()
    {
      private static final long serialVersionUID = 1L;

      public Page getTestPage()
      {
View Full Code Here

    Label label = (Label)tester.getLastRenderedPage().get("myLabel");
    assertNotNull(label);
    assertTrue(document.contains("<span wicket:id=\"myLabel\">Test Label</span>"));

    Panel panel = (Panel)tester.getLastRenderedPage().get("myPanel");
    assertNotNull(panel);
    assertTrue(document.contains("<wicket:panel>Inside the panel<span wicket:id=\"label\">mein Label</span></wicket:panel>"));

    label = (Label)tester.getLastRenderedPage().get("myPanel:label");
    assertNotNull(label);
View Full Code Here

    String document = tester.getLastResponseAsString();
    Label label = (Label)page.get("myLabel");
    assertNotNull(label);
    assertTrue(document.contains("<span wicket:id=\"myLabel\">Test Label</span>"));

    Panel panel = (Panel)page.get("myPanel");
    assertNotNull(panel);
    assertTrue(document.contains("<wicket:panel>Inside the panel<span wicket:id=\"label\">mein Label</span></wicket:panel>"));

    label = (Label)page.get("myPanel:label");
    assertNotNull(label);
View Full Code Here

    assertNotNull(label);
    ValueMap attr = label.getMarkupAttributes();
    assertNotNull(attr);
    assertEquals("myLabel", attr.getString("wicket:id"));

    Panel panel = (Panel)page.get("myPanel");
    assertNotNull(panel);
    attr = panel.getMarkupAttributes();
    assertNotNull(attr);
    assertEquals("myPanel", attr.getString("wicket:id"));

    label = (Label)page.get("myPanel:label");
    assertNotNull(label);
View Full Code Here

TOP

Related Classes of org.apache.wicket.markup.html.panel.Panel$PanelMarkupHelper

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.