Package org.apache.wicket

Examples of org.apache.wicket.MarkupContainer


      }
      else
      {
        while (rows.hasNext())
        {
          MarkupContainer row = (MarkupContainer)rows.next();
          cells = ((MarkupContainer)row.iterator().next()).iterator();
          if (cells.hasNext())
          {
            next = (Item)cells.next();
            break;
          }
View Full Code Here


      // head first.
      if (container instanceof WebPage)
      {
        // Create a special header component which will gather
        // additional input the <head> from 'contributors'.
        final MarkupContainer header = new HtmlHeaderContainer(
          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.
        final WebMarkupContainer header2 = new WebMarkupContainer(
          HtmlHeaderSectionHandler.HEADER_ID)
        {
          private static final long serialVersionUID = 1L;

          public boolean isTransparentResolver()
          {
            return true;
          }
        };

        header2.setRenderBodyOnly(true);

        header.add(header2);

        container.autoAdd(header, markupStream);
      }
      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.
        final WebMarkupContainer header = new WebMarkupContainer(
          HtmlHeaderSectionHandler.HEADER_ID)
        {
          private static final long serialVersionUID = 1L;

          public boolean isTransparentResolver()
          {
            return true;
          }
        };
        header.setRenderBodyOnly(true);

        try
        {
          container.autoAdd(header, markupStream);
        }
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

  {
    // In case of nested Borders, the outer border is no longer able to find
    // its body container easily. Thus we need to help resolve it.

    // The container is the body component. Get the Border component.
    MarkupContainer border = container.getParent();
    while ((border != null) && !(border instanceof Border))
    {
      border = border.getParent();
    }

    // Avoid recursions. It is the outer border which needs help to resolve
    // it. Not the inner border (this == border).
    if ((border == null) || (this == border))
View Full Code Here

   * @throws WicketRuntimeException
   *             Thrown if the image cannot be located
   */
  private void loadStaticImage(final String path)
  {
    MarkupContainer parent = component.findParentWithAssociatedMarkup();
    if (parent instanceof Border)
    {
      parent = parent.getParent();
    }
    final Class scope = parent.getClass();
    resourceReference = new ResourceReference(scope, path)
    {
      private static final long serialVersionUID = 1L;

      /**
 
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

   */
  public Component getChildComponent()
  {
    if (childComponent == null)
    {
      MarkupContainer parent = getEnclosureParent();

      if (childId == null)
      {
        throw new MarkupException(
          "You most likely forgot to register the EnclosureHandler with the MarkupParserFactory");
      }

      final Component child = parent.get(childId.toString());
      if (child == null)
      {
        throw new MarkupException(
          "Didn't find child component of <wicket:enclosure> with id='" + childId +
            "'. Component: " + this.toString());
View Full Code Here

   *
   * @return
   */
  private MarkupContainer getEnclosureParent()
  {
    MarkupContainer parent = getParent();
    while (parent != null)
    {
      if (parent.isTransparentResolver())
      {
        parent = parent.getParent();
      }
      else if (parent instanceof BorderBodyContainer)
      {
        parent = ((BorderBodyContainer)parent).findParent(Border.class);
      }
View Full Code Here

    setVisible(controller.determineVisibility());

    // transfer visibility to direct children
    originalVisibilityStatus = new HashMap();
    DirectChildTagIterator it = new DirectChildTagIterator(markupStream, openTag);
    MarkupContainer controllerParent = getEnclosureParent();
    while (it.hasNext())
    {
      ComponentTag t = (ComponentTag)it.next();
      Component child = controllerParent.get(t.getId());
      if (child != null)
      {
        originalVisibilityStatus.put(child, Boolean.valueOf(child.isVisibilityAllowed()));
        child.setVisibilityAllowed(isVisible());
      }
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

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.