Example usage for org.apache.wicket.markup MarkupException MarkupException

List of usage examples for org.apache.wicket.markup MarkupException MarkupException

Introduction

In this page you can find the example usage for org.apache.wicket.markup MarkupException MarkupException.

Prototype

public MarkupException(final MarkupStream markupStream, final String message) 

Source Link

Usage

From source file:org.artifactory.common.wicket.component.template.HtmlTemplate.java

License:Open Source License

public static String readBodyMarkup(MarkupStream markupStream, ComponentTag openTag) {
    StringBuilder innerMarkup = new StringBuilder();
    while (markupStream.hasMore()) {
        if (markupStream.get().closes(openTag)) {
            return innerMarkup.toString();
        }//from w  ww .  j a v a 2 s.  c o m
        innerMarkup.append(markupStream.get().toCharSequence().toString());
        markupStream.next();
    }
    throw new MarkupException(markupStream, "Expected close tag for " + openTag);
}