Package org.apache.wicket.markup

Examples of org.apache.wicket.markup.MarkupException


        }
      }
    }
    else
    {
      throw new MarkupException(markup.getMarkupResourceStream(),
        "Expected a Tag but found raw markup: " + elem.toString());
    }
  }
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

  {
    super(id);

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

    this.childId = childId;
  }
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

  {
    // Get the markup to search for the fragment markup
    IMarkupFragment markup = chooseMarkup(container);
    if (markup == null)
    {
      throw new MarkupException("The fragments markup provider has no associated markup. " +
        "No markup to search for fragment markup with id: " + markupId);
    }

    // Search for the fragment markup
    IMarkupFragment childMarkup = markup.find(markupId);
View Full Code Here

  @Override
  public void onComponentTag(Component component, ComponentTag tag)
  {
    if (tag.isOpen() == false)
    {
      throw new MarkupException(
        "The border tag must be an open tag. Open-close is not allowed: " + tag.toString());
    }

    super.onComponentTag(component, tag);
  }
View Full Code Here

    // Get the page markup
    IMarkupFragment markup = getPage().getMarkup();
    if (markup == null)
    {
      throw new MarkupException("Unable to get page markup: " + getPage().toString());
    }

    // Find the markup fragment
    MarkupStream stream = new MarkupStream(markup);
    IMarkupFragment headerMarkup = null;
View Full Code Here

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

    final Page page = findPage();
    if (page != null)
    {
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

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

    if (model != null)
    {
      setModelImpl(wrap(model));
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.