Examples of ComponentTag


Examples of org.apache.wicket.markup.ComponentTag

    for (; index < markup.size(); index++)
    {
      MarkupElement element = markup.get(index);
      if (element instanceof ComponentTag)
      {
        ComponentTag tag = (ComponentTag)element;

        if (tag.isOpen() || tag.isOpenClose())
        {
          DequeueTagAction action = canDequeueTag(tag);
          switch (action)
          {
            case IGNORE :
              continue;
            case DEQUEUE :
              index++;
              return tag;
            case SKIP : // skip to close tag
              boolean found = false;
              for (; index < markup.size(); index++)
              {
                if ((markup.get(index) instanceof ComponentTag)
                  && markup.get(index).closes(tag))
                {
                  found = true;
                  break;
                }
              }
              if (!found)
              {
                throw new IllegalStateException(
                  String.format("Could not find close tag for tag '%s' in markup: %s ",
                      tag, markup));
              }

          }
        }
        else
        {
          // closed tag
          ComponentTag open = tag.isClose() ? tag.getOpenTag() : tag;

          if (skipFirst && first != null && open == first)
          {
            continue;
          }
View Full Code Here

Examples of org.brixcms.markup.tag.ComponentTag

        MarkupRenderer renderer = new MarkupRenderer(markup.items, markup.doctype) {
            @Override
            void postprocessTagAttributes(Tag tag, Map<String, String> attributes) {
                // if during rendering we have a ComponentTag
                if (tag instanceof ComponentTag && tag.getType() != Tag.Type.CLOSE) {
                    ComponentTag componentTag = (ComponentTag) tag;
                    String id = getComponentID(componentTag);

                    // check if the component already is in hierarchy
                    if (getExistingComponents().contains(id)) {
                        // just put the wicket:id attribute to component tag
                        attributes.put("wicket:id", id);
                        components.add(id);
                    } else {
                        // otherwise we need to create the component instance
                        Component c = componentTag.getComponent(id, component.getModel());
                        if (c != null) {
                            attributes.put("wicket:id", id);
                            components.add(id);
                            ((MarkupContainer) component).add(c);
                        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.