Class HtmlHeaderSectionHandler
- java.lang.Object
-
- org.apache.wicket.markup.parser.AbstractMarkupFilter
-
- org.apache.wicket.markup.parser.filter.HtmlHeaderSectionHandler
-
- All Implemented Interfaces:
IMarkupFilter
public final class HtmlHeaderSectionHandler extends AbstractMarkupFilter
This is a markup inline filter.It assumes that
WicketTagIdentifier
has been called first and search for a <head> tag (note: not wicket:head). Provided the markup contains a <body> tag it will automatically prepend a <head> tag if missing.Additionally this filter handles <wicket:header-items/>. If there is such tag then it is marked as the one that should be used as
HtmlHeaderContainer
, by setting its id to "_header_".Note: This handler is only relevant for Pages (see MarkupParser.newFilterChain())
- Author:
- Juergen Donnerstag
- See Also:
MarkupParser
,HtmlHeaderResolver
-
-
Field Summary
Fields Modifier and Type Field Description static String
BODY
static String
HEAD
static String
HEADER_ID
The automatically assigned wicket:id to >head< tagstatic String
HEADER_ID_ITEM
-
Fields inherited from class org.apache.wicket.markup.parser.AbstractMarkupFilter
REQUEST_COUNTER_KEY
-
-
Constructor Summary
Constructors Constructor Description HtmlHeaderSectionHandler(Markup markup)
Construct.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected MarkupElement
onComponentTag(ComponentTag tag)
Invoked when a ComponentTag was found.-
Methods inherited from class org.apache.wicket.markup.parser.AbstractMarkupFilter
getMarkupResourceStream, getNextFilter, getRequestUniqueId, getWicketNamespace, getWicketNamespace, nextElement, onSpecialTag, postProcess, setNextFilter
-
-
-
-
Field Detail
-
BODY
public static final String BODY
- See Also:
- Constant Field Values
-
HEAD
public static final String HEAD
- See Also:
- Constant Field Values
-
HEADER_ID
public static final String HEADER_ID
The automatically assigned wicket:id to >head< tag- See Also:
- Constant Field Values
-
HEADER_ID_ITEM
public static final String HEADER_ID_ITEM
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
HtmlHeaderSectionHandler
public HtmlHeaderSectionHandler(Markup markup)
Construct.- Parameters:
markup
- The Markup object being filled while reading the markup resource
-
-
Method Detail
-
onComponentTag
protected final 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
-
-