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
WicketTagIdentifierhas 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 java.lang.StringBODYstatic java.lang.StringHEADstatic java.lang.StringHEADER_IDThe automatically assigned wicket:id to >head< tagstatic java.lang.StringHEADER_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 MarkupElementonComponentTag(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 java.lang.String BODY
- See Also:
- Constant Field Values
-
HEAD
public static final java.lang.String HEAD
- See Also:
- Constant Field Values
-
HEADER_ID
public static final java.lang.String HEADER_ID
The automatically assigned wicket:id to >head< tag- See Also:
- Constant Field Values
-
HEADER_ID_ITEM
public static final java.lang.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 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
-
-