Package org.apache.wicket.markup

Examples of org.apache.wicket.markup.MarkupException


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

    final Page page = findPage();
    if (page != null)
    {
View Full Code Here


    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 " +
              Classes.simpleName(component.getClass()) +
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

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

      {
        renderedComponents = new HashSet<Component>();
      }
      if (renderedComponents.add(component) == false)
      {
        throw new MarkupException(
          "The component " +
            component +
            " was rendered already. You can render it only once during a render phase. Class relative path: " +
            component.getClassRelativePath());
      }
View Full Code Here

    else if (HtmlHeaderResolver.HEADER_ITEMS.equalsIgnoreCase(tag.getName()) &&
        tag.getNamespace().equalsIgnoreCase(getWicketNamespace()))
    {
      if (foundHeaderItemsTag)
      {
        throw new MarkupException(new MarkupStream(markup),
            "More than one <wicket:header-items/> detected in the <head> element. Only one is allowed.");
      }
      else if (foundClosingHead)
      {
        throw new MarkupException(new MarkupStream(markup),
            "Detected <wicket:header-items/> after the closing </head> element.");
      }

      foundHeaderItemsTag = true;
      tag.setId(HEADER_ID);
      tag.setAutoComponentTag(true);
      tag.setModified(true);

      return tag;
    }
    else if (BODY.equalsIgnoreCase(tag.getName()) && (tag.getNamespace() == null))
    {
      // WICKET-4511: We found <body> inside <head> tag. Markup is not valid!
      if (foundHead && !foundClosingHead)
      {
        throw new MarkupException(new MarkupStream(markup),
          "Invalid page markup. Tag <BODY> found inside <HEAD>");
      }

      // We found <body>
      if (foundHead == false)
View Full Code Here

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

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

  public final void internalRenderComponent()
  {
    final IMarkupFragment markup = getMarkup();
    if (markup == null)
    {
      throw new MarkupException("Markup not found. Component: " + toString());
    }

    final MarkupStream markupStream = new MarkupStream(markup);

    // Get mutable copy of next tag
View Full Code Here

      final String pageClassName = (page != null) ? page.getClass().getName() : "unknown";
      final IResourceStream stream = markupStream.getResource();
      final String streamName = (stream != null) ? stream.toString() : "unknown";

      throw new MarkupException(
        "Mis-placed <wicket:head>. <wicket:head> must be outside of <wicket:panel>, <wicket:border>, " +
            "and <wicket:extend>. Error occurred while rendering page: " +
          pageClassName + " using markup stream: " + streamName);
    }
View Full Code Here

    if (markupStream.getPreviousTag().isOpen())
    {
      markupStream.skipRawMarkup();
      if (markupStream.get().closes(openTag) == false)
      {
        throw new MarkupException(markupStream, "Close tag not found for tag: " +
          openTag.toString() + ". Component: " + component.toString());
      }
    }
  }
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.