Module org.apache.wicket.core
Class FragmentMarkupSourcingStrategy
java.lang.Object
org.apache.wicket.markup.html.panel.AbstractMarkupSourcingStrategy
org.apache.wicket.markup.html.panel.FragmentMarkupSourcingStrategy
- All Implemented Interfaces:
IMarkupSourcingStrategy
A markup sourcing strategy suitable for Fragment components.
- Author:
- Juergen Donnerstag
-
Constructor Summary
ConstructorDescriptionFragmentMarkupSourcingStrategy
(String markupId, MarkupContainer markupProvider) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionchooseMarkup
(Component component) Get the markup stream which shall be used to search for the fragmentgetMarkup
(MarkupContainer container, Component child) Search for the child's markup in the fragment markup.protected final MarkupContainer
getMarkupProvider
(Component component) Returns markup provider associated with this fragmentvoid
onComponentTagBody
(Component component, MarkupStream markupStream, ComponentTag openTag) Skip the body markup associated with the 'component'.Methods inherited from class org.apache.wicket.markup.html.panel.AbstractMarkupSourcingStrategy
onComponentTag, renderHead, searchInNestedTransparentResolvers, searchMarkupInTransparentResolvers
-
Constructor Details
-
FragmentMarkupSourcingStrategy
Constructor.- Parameters:
markupId
- The associated id of the associated markup fragmentmarkupProvider
- The component whose markup contains the fragment's markup
-
-
Method Details
-
onComponentTagBody
public void onComponentTagBody(Component component, MarkupStream markupStream, ComponentTag openTag) Skip the body markup associated with the 'component'. The body markup is expected to be raw markup only, not containing an wicket component. The body markup may serve documentary purposes for the developer / designer.Than search for the markup of the fragment, effectively replacing the original markup.
- Specified by:
onComponentTagBody
in interfaceIMarkupSourcingStrategy
- Overrides:
onComponentTagBody
in classAbstractMarkupSourcingStrategy
- Parameters:
component
- The component calling the strategy- See Also:
-
getMarkupProvider
Returns markup provider associated with this fragment- Parameters:
component
-- Returns:
- markup provider
-
chooseMarkup
Get the markup stream which shall be used to search for the fragment- Parameters:
component
-- Returns:
- The markup stream to be used to find the fragment markup
-
getMarkup
Search for the child's markup in the fragment markup.- Specified by:
getMarkup
in interfaceIMarkupSourcingStrategy
- Specified by:
getMarkup
in classAbstractMarkupSourcingStrategy
- Parameters:
container
- The parent containing the child. This is not the direct parent, transparent componentresolver
may be in the hierarchy between.child
- The component to find the markup for.- Returns:
- the markup fragment for the child, or
null
. - See Also:
-