Interface IMarkupSourcingStrategy
-
- All Known Implementing Classes:
AbstractMarkupSourcingStrategy
,AssociatedMarkupSourcingStrategy
,BorderMarkupSourcingStrategy
,DefaultMarkupSourcingStrategy
,FragmentMarkupSourcingStrategy
,PanelMarkupSourcingStrategy
public interface IMarkupSourcingStrategy
Markup sourcing strategies determine whether a Component behaves like a "Panel" pulling its Markup from an associated Markup file, or like a Fragment pulling it from a another components Markup.- Author:
- Juergen Donnerstag
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IMarkupFragment
getMarkup(MarkupContainer container, Component child)
Will replace the respective component's method.void
onComponentTag(Component component, ComponentTag tag)
Will be called in addition toComponent.onComponentTag(ComponentTag)
and allows the strategy to modify the component's tag or any of the tag attributes.void
onComponentTagBody(Component component, MarkupStream markupStream, ComponentTag openTag)
Will replace the respective component's method.void
renderHead(Component component, HtmlHeaderContainer container)
Will be called in addition toComponent.internalRenderHead(HtmlHeaderContainer)
and allows the strategy to contribute to the <head> section of the response.
-
-
-
Method Detail
-
renderHead
void renderHead(Component component, HtmlHeaderContainer container)
Will be called in addition toComponent.internalRenderHead(HtmlHeaderContainer)
and allows the strategy to contribute to the <head> section of the response.- Parameters:
component
- The component calling the strategycontainer
-- See Also:
Component.internalRenderHead(HtmlHeaderContainer)
-
onComponentTag
void onComponentTag(Component component, ComponentTag tag)
Will be called in addition toComponent.onComponentTag(ComponentTag)
and allows the strategy to modify the component's tag or any of the tag attributes.- Parameters:
component
- The component calling the strategytag
-- See Also:
Component.onComponentTag(ComponentTag)
-
onComponentTagBody
void onComponentTagBody(Component component, MarkupStream markupStream, ComponentTag openTag)
Will replace the respective component's method.It's perfectly valid to call
component.onComponentTagBody(markupStream, openTag)
from inside this method.- Parameters:
component
- The component calling the strategymarkupStream
-openTag
-- See Also:
Component.onComponentTagBody(MarkupStream, ComponentTag)
-
getMarkup
IMarkupFragment getMarkup(MarkupContainer container, Component child)
Will replace the respective component's method. However by returning null, the component's method will be called.- 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:
MarkupContainer.getMarkup(Component)
-
-