Package org.apache.wicket.markup

Examples of org.apache.wicket.markup.MarkupException


  public final void renderComponent()
  {
    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


      {
        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

    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

    getApplication().notifyComponentInstantiationListeners(this);

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

      {
        renderedComponents = new HashSet();
      }
      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

    {
      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

        final Page page = container.getPage();
        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 occured while rendering page: " +
            pageClassName + " using markup stream: " + streamName);
      }

      // Yes, we handled the tag
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();
        MessageLabel label = new MessageLabel(id, messageKey);
View Full Code Here

    final Page page = findPage();

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

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

  {
    Class<? extends Page> pageClass = BorderTestHierarchyPage_4.class;

    System.out.println("=== " + pageClass.getName() + " ===");

    MarkupException markupException = null;
    try
    {
      tester.startPage(pageClass);
    }
    catch (MarkupException e)
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.