Class PanelMarkupSourcingStrategy
- java.lang.Object
-
- org.apache.wicket.markup.html.panel.AbstractMarkupSourcingStrategy
-
- org.apache.wicket.markup.html.panel.AssociatedMarkupSourcingStrategy
-
- org.apache.wicket.markup.html.panel.PanelMarkupSourcingStrategy
-
- All Implemented Interfaces:
IMarkupSourcingStrategy
public class PanelMarkupSourcingStrategy extends AssociatedMarkupSourcingStrategy
The Panel components markup sourcing strategy.The strategy supports two modes on how to handle the body markup. A typical Panel will ignore the body markup and replace it with the associated markup. The body markup is allowed to have raw markup only and no Wicket components. But e.g. a Border component will associate the body markup with a Body component which renders the markup including all any number of child Components.
- Author:
- Juergen Donnerstag
-
-
Constructor Summary
Constructors Constructor Description PanelMarkupSourcingStrategy(boolean allowWicketComponentsInBodyMarkup)
Constructor.PanelMarkupSourcingStrategy(String wicketTagName, boolean allowWicketComponentsInBodyMarkup)
Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PanelMarkupSourcingStrategy
get(boolean allowWicketComponentsInBodyMarkup)
void
onComponentTagBody(Component component, MarkupStream markupStream, ComponentTag openTag)
Skip the panel's body markup which is expected to contain raw markup only (no wicket components) and which will be ignored / removed.-
Methods inherited from class org.apache.wicket.markup.html.panel.AssociatedMarkupSourcingStrategy
findMarkupInAssociatedFileHeader, getMarkup, onComponentTag, renderAssociatedMarkup, renderHead, renderHeadFromAssociatedMarkupFile
-
Methods inherited from class org.apache.wicket.markup.html.panel.AbstractMarkupSourcingStrategy
searchInNestedTransparentResolvers, searchMarkupInTransparentResolvers
-
-
-
-
Constructor Detail
-
PanelMarkupSourcingStrategy
public PanelMarkupSourcingStrategy(String wicketTagName, boolean allowWicketComponentsInBodyMarkup)
Constructor.- Parameters:
wicketTagName
- The tag name for<wicket:'name' ..>
. Please note that any such tag must have been registered viaWicketTagIdentifier.registerWellKnownTagName("name");
allowWicketComponentsInBodyMarkup
-false
for Panel andtrue
for Border components. If Panel then the body markup should only contain raw markup, which is ignored (removed), but no Wicket Component. With Border components, the body markup will be associated with the Body Component.
-
PanelMarkupSourcingStrategy
public PanelMarkupSourcingStrategy(boolean allowWicketComponentsInBodyMarkup)
Constructor.- Parameters:
allowWicketComponentsInBodyMarkup
-false
for Panel andtrue
for Border components. If Panel then the body markup should only contain raw markup, which is ignored (removed), but no Wicket Component. With Border components, the body markup will be associated with the Body Component.
-
-
Method Detail
-
get
public static PanelMarkupSourcingStrategy get(boolean allowWicketComponentsInBodyMarkup)
- Parameters:
allowWicketComponentsInBodyMarkup
-false
for Panel andtrue
for Border components. If Panel then the body markup should only contain raw markup, which is ignored (removed), but no Wicket Component. With Border components, the body markup will be associated with the Body Component.- Returns:
- A singleton of the strategy
-
onComponentTagBody
public void onComponentTagBody(Component component, MarkupStream markupStream, ComponentTag openTag)
Skip the panel's body markup which is expected to contain raw markup only (no wicket components) and which will be ignored / removed. It'll be replaced with the content of the associated markup file.- Specified by:
onComponentTagBody
in interfaceIMarkupSourcingStrategy
- Overrides:
onComponentTagBody
in classAbstractMarkupSourcingStrategy
- Parameters:
component
- The component calling the strategy- See Also:
Component.onComponentTagBody(MarkupStream, ComponentTag)
-
-