public abstract class AssociatedMarkupSourcingStrategy extends AbstractMarkupSourcingStrategy
| Constructor and Description |
|---|
AssociatedMarkupSourcingStrategy(String tagName)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
IMarkupFragment |
findMarkupInAssociatedFileHeader(MarkupContainer container,
Component child)
Search the child's markup in the header section of the markup
|
IMarkupFragment |
getMarkup(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-close
|
protected void |
renderAssociatedMarkup(Component component)
Render the associated markup markup
|
void |
renderHead(Component component,
HtmlHeaderContainer container)
Render the header from the associated markup file
|
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.
|
onComponentTagBody, searchMarkupInTransparentResolverspublic AssociatedMarkupSourcingStrategy(String tagName)
tagName - Either "panel" or "border"public void onComponentTag(Component component, ComponentTag tag)
AbstractMarkupSourcingStrategyonComponentTag in interface IMarkupSourcingStrategyonComponentTag in class AbstractMarkupSourcingStrategycomponent - The component calling the strategyComponent.onComponentTag(ComponentTag)protected final void renderAssociatedMarkup(Component component)
component - public IMarkupFragment getMarkup(MarkupContainer parent, Component child)
getMarkup in interface IMarkupSourcingStrategygetMarkup in class AbstractMarkupSourcingStrategyparent - The container expected to contain the markup for childchild - The child component to find the markup forMarkupContainer.getMarkup(Component)public IMarkupFragment findMarkupInAssociatedFileHeader(MarkupContainer container, Component child)
container - child - public void renderHead(Component component, HtmlHeaderContainer container)
renderHead in interface IMarkupSourcingStrategyrenderHead in class AbstractMarkupSourcingStrategycomponent - The component calling the strategyComponent#renderHead(HtmlHeaderContainer)public final void renderHeadFromAssociatedMarkupFile(WebMarkupContainer container, HtmlHeaderContainer htmlContainer)
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.
container - htmlContainer - The HtmlHeaderContainer added to the PageCopyright © 2006–2014 Apache Software Foundation. All rights reserved.