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

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


  public void setUp()
  {
    super.setUp();

    selectableBehavior = new SelectableBehavior();
    Panel panel = new DivTestPanel("panelId");
    WebMarkupContainer component = new WebMarkupContainer("anId");
    component.setMarkupId("anId");
    component.add(selectableBehavior);
    panel.add(component);
    tester.startComponentInPage(panel);
  }
View Full Code Here


  @Before
  public void setUp()
  {
    super.setUp();

    Panel panel = new DivTestPanel("panelId");
    accordion = new Accordion("anId");
    accordion.setMarkupId(accordion.getId());
    panel.add(accordion);
    tester.startComponentInPage(panel);
  }
View Full Code Here

                    editProfileModalWin.show(target);
                }
            };
            selfRegLink.add(new Label("linkTitle", getString("selfRegistration")));

            Panel panel = new LinkPanel("selfRegistration", new ResourceModel("selfRegistration"));
            panel.add(selfRegLink);
            selfRegFrag.add(panel);
        } else {
            selfRegFrag = new Fragment("selfRegistration", "selfRegNotAllowed", this);
        }
        add(selfRegFrag);
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

    tester.processRequestCycle(label);
    String document = tester.getServletResponse().getDocument();
    assertNotNull(document);
    assertEquals("<span wicket:id=\"myLabel\">Test Label</span>", document);

    Panel panel = (Panel)tester.getLastRenderedPage().get("myPanel");
    assertNotNull(panel);
    tester.processRequestCycle(panel);
    document = tester.getServletResponse().getDocument();
    assertNotNull(document);
    assertEquals(
View Full Code Here

    tester.processRequestCycle(label);
    String document = tester.getServletResponse().getDocument();
    assertNotNull(document);
    assertEquals("<span wicket:id=\"myLabel\">Test Label</span>", document);

    Panel panel = (Panel)page.get("myPanel");
    assertNotNull(panel);
    tester.processRequestCycle(panel);
    document = tester.getServletResponse().getDocument();
    assertNotNull(document);
    assertEquals(
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

   */
  public void testRenderHomePage_10() throws Exception
  {
    executeTest(SimplePage_10.class, "SimplePageExpectedResult_10.html");

    Panel panel = (Panel)tester.getLastRenderedPage().get("myPanel");
    assertNotNull(panel);
    // we need to setup request/response before calling setvisible
    tester.setupRequestAndResponse();
    tester.createRequestCycle();

    panel.setVisible(true);
    tester.processRequestCycle(panel);
    String document = tester.getServletResponse().getDocument();
    assertNotNull(document);
    assertEquals(
      "<wicket:panel>Inside the panel<span wicket:id=\"label\">mein Label</span></wicket:panel>",
View Full Code Here

        final String paramName = paramMetadata.getName();
        final String paramLabel = paramMetadata.getName();
        final boolean required = paramMetadata.isRequired();
        final Class<?> binding = paramMetadata.getBinding();

        Panel parameterPanel;
        if ("namespace".equals(paramName)) {
            IModel namespaceModel = new NamespaceParamModel(paramsModel, paramName);
            IModel paramLabelModel = new ResourceModel(paramLabel, paramLabel);
            parameterPanel = new NamespacePanel(componentId, namespaceModel, paramLabelModel, true);
        } else if (Boolean.class == binding) {
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();
    compareMarkupWithFile(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();
    compareMarkupWithString(markup, "<span wicket:id=\"panel\">test</span>");

    // getMarkup(null) returns the markup which is used to find a child component, which in case
    // of Panel is the <wicket:panel> tag and is thus may not be equal to the associated markup
    // file.
    markup = panel.getMarkup(null);
    compareMarkupWithString(markup,
      "<wicket:panel>  <span wicket:id=\"label\">text</span></wicket:panel>");
  }
View Full Code Here

TOP

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

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.