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

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


        return "Whatever";
      }
    };

    add(panelContainer);
    Panel panel = new Panel_1("myPanel");
    panel.setRenderBodyOnly(true);
    panelContainer.add(panel);

    MarkupContainer borderContainer = new AbstractOutputTransformerContainer("test3")
    {
      private static final long serialVersionUID = 1L;
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

    container.setRenderBodyOnly(true);
    add(container);

    container.add(new Label("myLabel2", "Test Label2"));

    Panel panel = new SimplePanel("myPanel");
    panel.setRenderBodyOnly(true);
    add(panel);

    Border border = new SimpleBorder("myBorder");
    add(border);
View Full Code Here

        return "Whatever";
      }
    };

    add(panelContainer);
    Panel panel = new Panel_1("myPanel");
    panel.setRenderBodyOnly(true);
    panelContainer.add(panel);

    MarkupContainer borderContainer = new AbstractOutputTransformerContainer("test3")
    {
      private static final long serialVersionUID = 1L;
View Full Code Here

   *
   */
  public void testMultiLevelEmbeddedComponentLoadFromComponent()
  {
    DummyPage p = new DummyPage();
    Panel panel = new EmptyPanel("panel");
    p.add(panel);
    DummyComponent c = new DummyComponent("hello", tester.getApplication());
    panel.add(c);
    IStringResourceLoader loader = new ComponentStringResourceLoader();
    Assert.assertEquals("Valid resourse string should be found", "Component string",
      loader.loadStringResource(c.getClass(), "component.string", Locale.getDefault(), null,
        null));
  }
View Full Code Here

    form1.add(new MyTextField("text7", "input-3"));

    Form form2 = new TestForm("form2");
    add(form2);

    Panel panel1 = new EmptyPanel("panel1");
    form2.add(panel1);
    panel1.add(new MyTextField("text3", "input-3"));
    panel1.add(new MyTextField("text4", "input-4"));

    Panel panel2 = new TestPanel("panel2");
    form2.add(panel2);
    panel2.add(new MyTextField("text5", "input-5"));
    panel2.add(new MyTextField("text6", "input-6"));
    panel2.add(new MyTextField("text8", "input-8"));
    panel2.add(new MyTextField("text9", "input-9"));
    panel2.add(new MyTextField("text10", "input-10"));
    panel2.add(new MyTextField("text11", "input-11"));
    panel2.add(new MyTextField("text12", "input-12"));

    Form form3 = new TestForm("form3")
    {
      private static final long serialVersionUID = 1L;
View Full Code Here

   * @throws Exception
   */
  public void testPanel() throws Exception
  {
    Page page = new MyPage();
    Panel panel = new MyPanel("panel");
    page.add(panel);

    // Get the associated markup file
    IMarkupFragment markup = panel.getAssociatedMarkup();
    compareWithFile(markup, "MyPanel_ExpectedResult.html");

    // The Page is missing the tag to "call" the panel
    assertNull(panel.getMarkup());

    // Create a Page with proper markup for the panel
    page = new MyPanelPage();
    panel = (Panel)page.get("panel");

    // getMarkup() returns the "calling" tags
    markup = panel.getMarkup();
    compare(markup, "<span wicket:id=\"panel\">test</span>");

    // getMarkup(null) returns the markup which is used to find a child component
    markup = panel.getMarkup(null);
    compare(markup, "<wicket:panel>  <span wicket:id=\"label\">text</span></wicket:panel>");
  }
View Full Code Here

    setModelObject(new Integer(index));

    ITab tab = (ITab)tabs.get(index);

    Panel panel = tab.getPanel(TAB_PANEL_ID);

    if (panel == null)
    {
      throw new WicketRuntimeException("ITab.getPanel() returned null. TabbedPanel [" +
        getPath() + "] ITab index [" + index + "]");

    }

    if (!panel.getId().equals(TAB_PANEL_ID))
    {
      throw new WicketRuntimeException(
        "ITab.getPanel() returned a panel with invalid id [" +
          panel.getId() +
          "]. You must always return a panel with id equal to the provided panelId parameter. TabbedPanel [" +
          getPath() + "] ITab index [" + index + "]");
    }

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.