|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.wicket.markup.parser.AbstractMarkupFilter
org.apache.wicket.markup.parser.filter.HtmlProblemFinder
public final class HtmlProblemFinder
This is a markup inline filter which by default is not added to the list of markup filter. It can be added by means of subclassing Application.newMarkupParser() like
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.
| Field Summary | |
|---|---|
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 Summary | |
|---|---|
HtmlProblemFinder(int problemEscalation)
Construct. |
|
| Method Summary | |
|---|---|
protected MarkupElement |
onComponentTag(ComponentTag tag)
Invoked when a ComponentTag was found. |
| Methods inherited from class org.apache.wicket.markup.parser.AbstractMarkupFilter |
|---|
getMarkupResourceStream, getNextFilter, getWicketNamespace, nextElement, onSpecialTag, postProcess, setNextFilter |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public 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
| Constructor Detail |
|---|
public HtmlProblemFinder(int problemEscalation)
problemEscalation - How to escalate the issue found.| Method Detail |
|---|
protected final MarkupElement onComponentTag(ComponentTag tag)
throws ParseException
AbstractMarkupFilterBy default this method is also called for WicketTags.
onComponentTag in class AbstractMarkupFilterParseException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||