Module org.apache.wicket.core
Class AssociatedMarkupSourcingStrategy
java.lang.Object
org.apache.wicket.markup.html.panel.AbstractMarkupSourcingStrategy
org.apache.wicket.markup.html.panel.AssociatedMarkupSourcingStrategy
- All Implemented Interfaces:
IMarkupSourcingStrategy
- Direct Known Subclasses:
BorderMarkupSourcingStrategy
,PanelMarkupSourcingStrategy
Boilerplate for a markup sourcing strategy which retrieves the markup from associated markup
files.
- Author:
- Juergen Donnerstag
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfindMarkupInAssociatedFileHeader
(MarkupContainer container, Component child) Search the child's markup in the header section of the markupgetMarkup
(MarkupContainer parent, Component child) Search for the child's markup in the associated markup file.void
onComponentTag
(Component component, ComponentTag tag) Make sure we open up open-close tags to open-body-closeprotected final void
renderAssociatedMarkup
(Component component) Render the associated markup markupvoid
renderHead
(Component component, HtmlHeaderContainer container) Render the header from the associated markup filefinal void
renderHeadFromAssociatedMarkupFile
(WebMarkupContainer container, HtmlHeaderContainer htmlContainer) Called by components like Panel and Border which have associated Markup and which may have a <wicket:head> tag.Methods inherited from class org.apache.wicket.markup.html.panel.AbstractMarkupSourcingStrategy
onComponentTagBody, searchInNestedTransparentResolvers, searchMarkupInTransparentResolvers
-
Constructor Details
-
AssociatedMarkupSourcingStrategy
Constructor.- Parameters:
tagName
- Either "panel" or "border"
-
-
Method Details
-
onComponentTag
Description copied from class:AbstractMarkupSourcingStrategy
Make sure we open up open-close tags to open-body-close- Specified by:
onComponentTag
in interfaceIMarkupSourcingStrategy
- Overrides:
onComponentTag
in classAbstractMarkupSourcingStrategy
- Parameters:
component
- The component calling the strategy- See Also:
-
renderAssociatedMarkup
Render the associated markup markup- Parameters:
component
-
-
getMarkup
Search for the child's markup in the associated markup file.- Specified by:
getMarkup
in interfaceIMarkupSourcingStrategy
- Specified by:
getMarkup
in classAbstractMarkupSourcingStrategy
- Parameters:
parent
- The container expected to contain the markup for childchild
- The child component to find the markup for- Returns:
- The markup associated with the child
- See Also:
-
findMarkupInAssociatedFileHeader
Search the child's markup in the header section of the markup- Parameters:
container
-child
-- Returns:
- Null, if not found
-
renderHead
Render the header from the associated markup file- Specified by:
renderHead
in interfaceIMarkupSourcingStrategy
- Overrides:
renderHead
in classAbstractMarkupSourcingStrategy
- Parameters:
component
- The component calling the strategy- See Also:
-
renderHeadFromAssociatedMarkupFile
public final void renderHeadFromAssociatedMarkupFile(WebMarkupContainer container, HtmlHeaderContainer htmlContainer) Called by components like Panel and Border which have associated Markup and which may have a <wicket:head> tag.Whereas 'this' might be a Panel or Border, the HtmlHeaderContainer parameter has been added to the Page as a container for all headers any of its components might wish to contribute to.
The headers contributed are rendered in the standard way.
- Parameters:
container
-htmlContainer
- The HtmlHeaderContainer added to the Page
-