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 boolean
hasEqualTagName(ComponentTag tag1, ComponentTag tag2)
Compare tag name including namespaceprotected MarkupElement
onComponentTag(ComponentTag tag)
Invoked when a ComponentTag was found.void
postProcess(Markup markup)
Called after all filters have been processed.static boolean
requiresCloseTag(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
-
-
-
-
Constructor Detail
-
HtmlHandler
public HtmlHandler()
Construct.
-
-
Method Detail
-
postProcess
public void postProcess(Markup markup)
Description copied from interface:IMarkupFilter
Called after all filters have been processed.- Specified by:
postProcess
in interfaceIMarkupFilter
- Overrides:
postProcess
in classAbstractMarkupFilter
-
onComponentTag
protected MarkupElement onComponentTag(ComponentTag tag) throws ParseException
Description copied from class:AbstractMarkupFilter
Invoked when a ComponentTag was found.By default this method is also called for WicketTags.
- Specified by:
onComponentTag
in classAbstractMarkupFilter
- Returns:
- Usually the same as the tag attribute
- Throws:
ParseException
-
requiresCloseTag
public static boolean requiresCloseTag(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
-
-