Package org.apache.wicket

Examples of org.apache.wicket.MarkupContainer


   * @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 PackageResourceReference(scope, path, locale, style, variation);
    bind();
  }
View Full Code Here


  protected void onInitialize()
  {
    super.onInitialize();

    // enclosure's parent container
    MarkupContainer container = getEnclosureParent();

    // clear the cache
    childComponent = null;

    // get Child Component. If not "added", ask a resolver to find it.
View Full Code Here

   *
   * @return enclosure's parent markup container
   */
  private MarkupContainer getEnclosureParent()
  {
    MarkupContainer parent = getParent();
    while ((parent != null) && parent.isAuto())
    {
      parent = parent.getParent();
    }

    if (parent == null)
    {
      throw new WicketRuntimeException(
View Full Code Here

    // Search for the fragment markup
    IMarkupFragment childMarkup = markup.find(markupId);
    if (childMarkup == null)
    {
      // There is one more option if the markup provider has associated markup
      MarkupContainer markupProvider = getMarkupProvider(container);
      if (markupProvider.hasAssociatedMarkup())
      {
        markup = markupProvider.getAssociatedMarkup();
        if (markup != null)
        {
          childMarkup = markup.find(markupId);
        }
      }
    }

    if (childMarkup == null)
    {
      throw new MarkupNotFoundException("No Markup found for Fragment " + markupId +
        " in providing markup container " + markupProvider.toString());
    }

    if (child == null)
    {
      return childMarkup;
View Full Code Here

    RequestCycle requestCycle = RequestCycle.get();

    final Response originalResponse = requestCycle.getResponse();
    BufferedWebResponse tempResponse = new BufferedWebResponse(null);

    MarkupContainer oldParent = component.getParent();

    try
    {
      requestCycle.setResponse(tempResponse);

      // add the component to a dummy page just for the rendering
      RenderPage page = new RenderPage(component);
      page.internalInitialize();

      component.render();
    }
    finally
    {
      if (oldParent != null)
      {
        oldParent.add(component); // re-add the child to its old parent
      }

      requestCycle.setResponse(originalResponse);
    }
View Full Code Here

      add(newIndentation(this, "indent", node, level));

      add(newJunctionLink(this, "link", "image", node));

      MarkupContainer nodeLink = newNodeLink(this, "nodeLink", node);
      add(nodeLink);

      nodeLink.add(newNodeIcon(nodeLink, "icon", node));

      nodeLink.add(new Label("label", new AbstractReadOnlyModel<String>()
      {
        private static final long serialVersionUID = 1L;

        /**
         * @see org.apache.wicket.model.AbstractReadOnlyModel#getObject()
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

   */
  private void visitChildrenInContainingBorder(final FormComponent.IVisitor visitor)
  {
    if (getParent() instanceof Border)
    {
      MarkupContainer border = getParent();
      Iterator<? extends Component> iter = border.iterator();
      while (iter.hasNext())
      {
        Component child = iter.next();
        if (child instanceof FormComponent)
        {
View Full Code Here

    if (!error[0])
    {
      if (getParent() instanceof Border)
      {
        MarkupContainer border = getParent();
        Iterator<? extends Component> iter = border.iterator();
        while (iter.hasNext())
        {
          Component child = iter.next();
          if ((child != this) && (child instanceof FormComponent))
          {
View Full Code Here

   */
  private void internalUpdateFormComponentModels()
  {
    FormComponent.visitComponentsPostOrder(this, new FormModelUpdateVisitor(this));

    MarkupContainer border = findParent(Border.class);
    if (border != null)
    {
      FormComponent.visitComponentsPostOrder(border, new FormModelUpdateVisitor(this));
    }
  }
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.