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, searchInNestedTransparentResolvers, searchMarkupInTransparentResolvers
public AssociatedMarkupSourcingStrategy(String tagName)
tagName
- Either "panel" or "border"public void onComponentTag(Component component, ComponentTag tag)
AbstractMarkupSourcingStrategy
onComponentTag
in interface IMarkupSourcingStrategy
onComponentTag
in class AbstractMarkupSourcingStrategy
component
- The component calling the strategyComponent.onComponentTag(ComponentTag)
protected final void renderAssociatedMarkup(Component component)
component
- public IMarkupFragment getMarkup(MarkupContainer parent, Component child)
getMarkup
in interface IMarkupSourcingStrategy
getMarkup
in class AbstractMarkupSourcingStrategy
parent
- 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 IMarkupSourcingStrategy
renderHead
in class AbstractMarkupSourcingStrategy
component
- The component calling the strategyComponent.internalRenderHead(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–2016 Apache Software Foundation. All rights reserved.