Class HeadForceTagIdHandler
java.lang.Object
org.apache.wicket.markup.parser.AbstractMarkupFilter
org.apache.wicket.markup.parser.filter.HeadForceTagIdHandler
- All Implemented Interfaces:
IMarkupFilter
Handler that sets unique tag id for every inline script and style element in <wicket:head>,
unless the element already has one.
This is needed to be able to detect multiple ajax header contribution. Tags that are not inline (stript with src attribute set and link with href attribute set) do not require id, because the detection is done by comparing URLs.
This is needed to be able to detect multiple ajax header contribution. Tags that are not inline (stript with src attribute set and link with href attribute set) do not require id, because the detection is done by comparing URLs.
Tags with wicket:id are not processed. To setOutputWicketId(true) on attached component is developer's responsibility. FIXME: Really? And if so, document properly
- Author:
- Matej Knopp
-
Field Summary
Fields inherited from class org.apache.wicket.markup.parser.AbstractMarkupFilter
REQUEST_COUNTER_KEY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected final MarkupElement
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
-
Constructor Details
-
HeadForceTagIdHandler
Construct.- Parameters:
markupFileClass
- Used to generated the a common prefix for the id
-
-
Method Details
-
onComponentTag
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
-