Class HtmlHandler
- java.lang.Object
-
- org.apache.wicket.markup.parser.AbstractMarkupFilter
-
- org.apache.wicket.markup.parser.filter.HtmlHandler
-
- All Implemented Interfaces:
IMarkupFilter
public final class HtmlHandler extends AbstractMarkupFilter
This is a markup inline filter. It identifies HTML specific issues which make HTML not 100% xml compliant. E.g. tags like <p> often are missing the corresponding close tag.- Author:
- Juergen Donnerstag
-
-
Field Summary
-
Fields inherited from class org.apache.wicket.markup.parser.AbstractMarkupFilter
REQUEST_COUNTER_KEY
-
-
Constructor Summary
Constructors Constructor Description HtmlHandler()Construct.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static booleanhasEqualTagName(ComponentTag tag1, ComponentTag tag2)Compare tag name including namespaceprotected MarkupElementonComponentTag(ComponentTag tag)Invoked when a ComponentTag was found.voidpostProcess(Markup markup)Called after all filters have been processed.static booleanrequiresCloseTag(java.lang.String name)Gets whether this tag does not require a closing tag.-
Methods inherited from class org.apache.wicket.markup.parser.AbstractMarkupFilter
getMarkupResourceStream, getNextFilter, getRequestUniqueId, getWicketNamespace, getWicketNamespace, nextElement, onSpecialTag, setNextFilter
-
-
-
-
Method Detail
-
postProcess
public void postProcess(Markup markup)
Description copied from interface:IMarkupFilterCalled after all filters have been processed.- Specified by:
postProcessin interfaceIMarkupFilter- Overrides:
postProcessin classAbstractMarkupFilter
-
onComponentTag
protected MarkupElement onComponentTag(ComponentTag tag) throws java.text.ParseException
Description copied from class:AbstractMarkupFilterInvoked when a ComponentTag was found.By default this method is also called for WicketTags.
- Specified by:
onComponentTagin classAbstractMarkupFilter- Returns:
- Usually the same as the tag attribute
- Throws:
java.text.ParseException
-
requiresCloseTag
public static boolean requiresCloseTag(java.lang.String name)
Gets whether this tag does not require a closing tag.- Parameters:
name- The tag's name, e.g. a, br, div, etc.- Returns:
- True if this tag does not require a closing tag
-
hasEqualTagName
public static boolean hasEqualTagName(ComponentTag tag1, ComponentTag tag2)
Compare tag name including namespace- Parameters:
tag1-tag2-- Returns:
- true if name and namespace are equal
-
-