Package org.apache.wicket

Examples of org.apache.wicket.MarkupContainer


  /**
   * Construct.
   */
  public SimplePage2()
  {
    MarkupContainer container1 = addXXX("container1", this);
    MarkupContainer container2 = addXXX("container2", this);
    MarkupContainer container2_1 = addXXX("container2_1", container2);
    MarkupContainer container3 = addXXX("container3", this);
    MarkupContainer container3_1 = addXXX("container3_1", container3);
    MarkupContainer container3_1_1 = addXXX("container3_1_1", container3_1);

    MarkupContainer container4 = addXXX("container4", this);
    MarkupContainer container4_1 = addXXX("container4_1", container4);
    MarkupContainer container4_2 = addXXX("container4_2", container4);
    MarkupContainer container4_2_1 = addXXX("container4_2_1", container4_2);
    MarkupContainer container4_3 = addXXX("container4_3", container4);
    MarkupContainer container4_3_1 = addXXX("container4_3_1", container4_3);
    MarkupContainer container4_3_1_1 = addXXX("container4_3_1_1", container4_3_1);

    add(new SimplePanel1("panel1"));
  }
View Full Code Here


    add(new SimplePanel1("panel1"));
  }

  private MarkupContainer addXXX(final String id, final MarkupContainer parent)
  {
    MarkupContainer container = new WebMarkupContainer(id);
    parent.add(container);
    container.add(new Behavior()
    {
      @Override
      public void renderHead(Component component, IHeaderResponse response)
      {
        response.renderCSSReference(id + ".css");
View Full Code Here

  /**
   * Construct.
   */
  public SimplePage1()
  {
    MarkupContainer container1 = addXXX("container1", this);
    MarkupContainer container2 = addXXX("container2", this);
    MarkupContainer container2_1 = addXXX("container2_1", container2);
    MarkupContainer container3 = addXXX("container3", this);
    MarkupContainer container3_1 = addXXX("container3_1", container3);
    MarkupContainer container3_1_1 = addXXX("container3_1_1", container3_1);

    MarkupContainer container4 = addXXX("container4", this);
    MarkupContainer container4_1 = addXXX("container4_1", container4);
    MarkupContainer container4_2 = addXXX("container4_2", container4);
    MarkupContainer container4_2_1 = addXXX("container4_2_1", container4_2);
    MarkupContainer container4_3 = addXXX("container4_3", container4);
    MarkupContainer container4_3_1 = addXXX("container4_3_1", container4_3);
    MarkupContainer container4_3_1_1 = addXXX("container4_3_1_1", container4_3_1);
  }
View Full Code Here

    MarkupContainer container4_3_1_1 = addXXX("container4_3_1_1", container4_3_1);
  }

  private MarkupContainer addXXX(final String id, final MarkupContainer parent)
  {
    MarkupContainer container = new WebMarkupContainer(id);
    parent.add(container);
    container.add(new Behavior()
    {
      @Override
      public void renderHead(Component component, IHeaderResponse response)
      {
        response.renderCSSReference(id + ".css");
View Full Code Here

          log.warn("Did not find corresponding java class: " + className);
          // fall through
        }

        // Make sure base markup pages (inheritance) are handled correct
        MarkupContainer parentWithContainer = container;
        if (container.getParent() != null)
        {
          parentWithContainer = container.findParentWithAssociatedMarkup();
        }
        if ((parentWithContainer instanceof Page) && !pathInfo.path.startsWith("/") &&
View Full Code Here

    searchStack.add(component.getClass());

    if (!(component instanceof Page))
    {
      // Add all the component on the way to the Page
      MarkupContainer container = component.getParent();
      while (container != null)
      {
        searchStack.add(container.getClass());
        if (container instanceof Page)
        {
          break;
        }

        container = container.getParent();
      }
    }
    return searchStack;
  }
View Full Code Here

    // Re-parent children of <wicket:component>.
    if ((tag.getId() != null) && nestedComponents.containsKey(container))
    {
      // Make sure you handle nested auto-components properly
      MarkupContainer parent = nestedComponents.get(container);
      while (parent != null)
      {
        Component component = parent.get(tag.getId());
        if (component != null)
        {
          return component;
        }

        parent = parent.getParent();
        if (nestedComponents.containsKey(parent))
        {
          parent = nestedComponents.get(parent);
        }
      }
View Full Code Here

      // head first.
      if (container instanceof WebPage)
      {
        // Create a special header component which will gather
        // additional input the <head> from 'contributors'.
        MarkupContainer header = newHtmlHeaderContainer(HtmlHeaderSectionHandler.HEADER_ID +
          container.getPage().getAutoIndex());

        // It is <wicket:head>. Because they do not provide any
        // additional functionality they are merely a means of surrounding relevant
        // markup. Thus we simply create a WebMarkupContainer to handle
        // the tag.
        WebMarkupContainer header2 = new TransparentWebMarkupContainer(
          HtmlHeaderSectionHandler.HEADER_ID);

        header2.setRenderBodyOnly(true);
        header.add(header2);

        return header;
      }
      else if (container instanceof HtmlHeaderContainer)
      {
        // It is <wicket:head>. Because they do not provide any
        // additional functionality there are merely a means of surrounding
        // relevant markup. Thus we simply create a WebMarkupContainer to handle
        // the tag.
        WebMarkupContainer header = new TransparentWebMarkupContainer(
          HtmlHeaderSectionHandler.HEADER_ID);
        header.setRenderBodyOnly(true);

        return header;
      }
      final Page page = container.getPage();
      final String pageClassName = (page != null) ? page.getClass().getName() : "unknown";
View Full Code Here

   */
  public void testInlinePanel_8() throws Exception
  {
    executeTest(InlinePanelPage_8.class, "InlinePanelPageExpectedResult_8.html");
    Page page = tester.getLastRenderedPage();
    MarkupContainer node = (MarkupContainer)page.get("first:nextContainer");
    assertNotNull(node);
    tester.clickLink("add");
    tester.assertComponentOnAjaxResponse(node);
  }
View Full Code Here

    addAll("pre_");
  }

  private void addAll(final String prefix)
  {
    MarkupContainer container1 = addXXX(prefix + "container1", this);
    MarkupContainer container2 = addXXX(prefix + "container2", this);
    MarkupContainer container2_1 = addXXX(prefix + "container2_1", container2);
    MarkupContainer container3 = addXXX(prefix + "container3", this);
    MarkupContainer container3_1 = addXXX(prefix + "container3_1", container3);
    MarkupContainer container3_1_1 = addXXX(prefix + "container3_1_1", container3_1);

    MarkupContainer container4 = addXXX(prefix + "container4", this);
    MarkupContainer container4_1 = addXXX(prefix + "container4_1", container4);
    MarkupContainer container4_2 = addXXX(prefix + "container4_2", container4);
    MarkupContainer container4_2_1 = addXXX(prefix + "container4_2_1", container4_2);
    MarkupContainer container4_3 = addXXX(prefix + "container4_3", container4);
    MarkupContainer container4_3_1 = addXXX(prefix + "container4_3_1", container4_3);
    MarkupContainer container4_3_1_1 = addXXX(prefix + "container4_3_1_1", container4_3_1);
  }
View Full Code Here

TOP

Related Classes of org.apache.wicket.MarkupContainer

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.