Package org.apache.wicket.markup

Examples of org.apache.wicket.markup.MarkupException


    if (markupStream.getPreviousTag().isOpen())
    {
      markupStream.skipRawMarkup();
      if (markupStream.get().closes(openTag) == false)
      {
        throw new MarkupException(
          markupStream,
          "Close tag not found for tag: " +
            openTag.toString() +
            ". For " +
            component.getClass().getSimpleName() +
View Full Code Here


        WicketTag tag = (WicketTag)elem;
        if (tag.isOpen() && tag.isHeadTag())
        {
          if (noMoreWicketHeadTagsAllowed == true)
          {
            throw new MarkupException(
              "<wicket:head> tags are only allowed before <body>, </head>, <wicket:panel> etc. tag");
          }
          return associatedMarkupStream.getCurrentIndex();
        }
        // wicket:head must be before border, panel or extend
View Full Code Here

    final DebugSettings debugSettings = Application.get().getDebugSettings();
    if (debugSettings.isLinePreciseReportingOnAddComponentEnabled()
      && debugSettings.getComponentUseCheck())
    {
      child.setMetaData(ADDED_AT_KEY,
        ComponentStrings.toString(child, new MarkupException("added")));
    }

    Page page = null;
    MarkupContainer queueRegion = null;
    Component cursor = this;
View Full Code Here

  {
    // Border require an associated markup resource file
    IMarkupFragment markup = getAssociatedMarkup();
    if (markup == null)
    {
      throw new MarkupException("Unable to find associated markup file for Border: " +
        this.toString());
    }

    // Find <wicket:border>
    IMarkupFragment borderMarkup = null;
    for (int i = 0; i < markup.size(); i++)
    {
      MarkupElement elem = markup.get(i);
      if (TagUtils.isWicketBorderTag(elem))
      {
        borderMarkup = new MarkupFragment(markup, i);
        break;
      }
    }

    if (borderMarkup == null)
    {
      throw new MarkupException(markup.getMarkupResourceStream(),
        "Unable to find <wicket:border> tag in associated markup file for Border: " +
          this.toString());
    }

    // If child == null, return the markup fragment starting with the <wicket:border> tag
View Full Code Here

        WicketTag tag = (WicketTag)elem;
        if (tag.isOpen() && tag.isHeadTag())
        {
          if (noMoreWicketHeadTagsAllowed == true)
          {
            throw new MarkupException(
              "<wicket:head> tags are only allowed before <body>, </head>, <wicket:panel> etc. tag");
          }
          return associatedMarkupStream.getCurrentIndex();
        }
        // wicket:head must be before border, panel or extend
View Full Code Here

      if (wtag.isMessageTag())
      {
        String messageKey = wtag.getAttributes().getString("key");
        if ((messageKey == null) || (messageKey.trim().length() == 0))
        {
          throw new MarkupException(
            "Wrong format of <wicket:message key='xxx'>: attribute 'key' is missing");
        }

        final String id = "_message_" + container.getPage().getAutoIndex();
        MessageContainer label = new MessageContainer(id, messageKey);
View Full Code Here

        WicketTag tag = (WicketTag)elem;
        if (tag.isOpen() && tag.isHeadTag())
        {
          if (noMoreWicketHeadTagsAllowed == true)
          {
            throw new MarkupException(
              "<wicket:head> tags are only allowed before <body>, </head>, <wicket:panel> etc. tag");
          }
          return associatedMarkupStream.getCurrentIndex();
        }
        // wicket:head must be before border, panel or extend
View Full Code Here

    {
      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());
      }
      childComponent = child;
    }
View Full Code Here

      {
        renderedComponents = new HashSet<Component>();
      }
      if (renderedComponents.add(component) == false)
      {
        throw new MarkupException("The component " + component +
          " has the same wicket:id as another component already added at the same level");
      }
      if (log.isDebugEnabled())
      {
        log.debug("Rendered " + component);
View Full Code Here

    getApplication().notifyComponentInstantiationListeners(this);

    final IDebugSettings debugSettings = Application.get().getDebugSettings();
    if (debugSettings.isLinePreciseReportingOnNewComponentEnabled())
    {
      setMetaData(CONSTRUCTED_AT_KEY, Strings.toString(this, new MarkupException(
        "constructed")));
    }

    if (model != null)
    {
View Full Code Here

TOP

Related Classes of org.apache.wicket.markup.MarkupException

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.