public final class HtmlProblemFinder extends AbstractMarkupFilter
Application#init() {
getMarkupSettings().setMarkupParserFactory() {
new MarkupParserFactory() {
MarkupParser newMarkupParser(final MarkupResourceStream resource) {
MarkupParser parser=super.newMarkupParser(resource);
parser.appendMarkupFilter(new HtmlProblemFinder(HtmlProblemFinder.ERR_THROW_EXCEPTION));
return parser;
}
}
}
}
The purpose of the filter is to find possible HTML issues and to log a warning.| Modifier and Type | Field and Description |
|---|---|
static int |
ERR_INGORE
Ignore the issue detected
|
static int |
ERR_LOG_ERROR
Log an error on the issue detected
|
static int |
ERR_LOG_WARN
Log a warning on the issue detected
|
static int |
ERR_THROW_EXCEPTION
Throw an exception on the issue detected
|
| Constructor and Description |
|---|
HtmlProblemFinder(int problemEscalation)
Construct.
|
| Modifier and Type | Method and Description |
|---|---|
protected MarkupElement |
onComponentTag(ComponentTag tag)
Invoked when a ComponentTag was found.
|
getMarkupResourceStream, getNextFilter, getWicketNamespace, getWicketNamespace, nextElement, onSpecialTag, postProcess, setNextFilterpublic static final int ERR_INGORE
public static final int ERR_LOG_WARN
public static final int ERR_LOG_ERROR
public static final int ERR_THROW_EXCEPTION
public HtmlProblemFinder(int problemEscalation)
problemEscalation - How to escalate the issue found.protected final MarkupElement onComponentTag(ComponentTag tag) throws ParseException
AbstractMarkupFilterBy default this method is also called for WicketTags.
onComponentTag in class AbstractMarkupFilterParseExceptionCopyright © 2006–2014 Apache Software Foundation. All rights reserved.