java.lang.Object
org.apache.wicket.markup.AbstractMarkupParser
org.apache.wicket.markup.MarkupParser
This is Wicket's default markup parser. It gets pre-configured with Wicket's default wicket
filters.
- Author:
- Juergen Donnerstag
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionclass
A simple extension to ArrayList to manage Wicket MarkupFilter's more easily -
Field Summary
Fields inherited from class org.apache.wicket.markup.AbstractMarkupParser
CONDITIONAL_COMMENT_OPENING
-
Constructor Summary
ConstructorDescriptionMarkupParser
(String markup) Constructor.MarkupParser
(MarkupResourceStream resource) Constructor.MarkupParser
(IXmlPullParser xmlParser, MarkupResourceStream resource) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
add
(IMarkupFilter filter) Add a markup filterfinal boolean
add
(IMarkupFilter filter, Class<? extends IMarkupFilter> beforeFilter) Add a markup filter before the 'beforeFilter'protected MarkupParser.MarkupFilterList
initializeMarkupFilters
(Markup markup) Initialize Wicket's MarkupParser with all necessary markup filters.protected IMarkupFilter
onAppendMarkupFilter
(IMarkupFilter filter) a) Allow subclasses to configure individual Wicket filtersMethods inherited from class org.apache.wicket.markup.AbstractMarkupParser
compressWhitespace, getMarkupResourceStream, handleRawText, parse, postProcess, setWicketNamespace, toString
-
Field Details
-
WICKET
"wicket"- See Also:
-
-
Constructor Details
-
MarkupParser
Constructor.- Parameters:
resource
- The markup resource (file)
-
MarkupParser
Constructor. Usually for testing purposes only- Parameters:
markup
- The markup resource.
-
MarkupParser
Constructor.- Parameters:
xmlParser
- The streaming xml parser to read and parse the markupresource
- The markup resource (file)
-
-
Method Details
-
getMarkupFilters
- Overrides:
getMarkupFilters
in classAbstractMarkupParser
- Returns:
- Gets the list of markup filters
-
add
Add a markup filter- Parameters:
filter
-- Returns:
- true, if successful
-
add
Add a markup filter before the 'beforeFilter'- Parameters:
filter
-beforeFilter
-- Returns:
- true, if successful
-
onAppendMarkupFilter
a) Allow subclasses to configure individual Wicket filtersb) Allows to disable Wicket filters via returning false
- Parameters:
filter
-- Returns:
- The filter to be added. Null to ignore.
-
initializeMarkupFilters
Initialize Wicket's MarkupParser with all necessary markup filters. You may subclass this method, to add your own filters to the list.- Specified by:
initializeMarkupFilters
in classAbstractMarkupParser
- Parameters:
markup
-- Returns:
- The list of markup filter
-