org.apache.wicket.markup.html.panel
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
 IMarkupFragment getMarkup(MarkupContainer container, Component child)
          Will replace the respective component's method.
 void onComponentTag(Component component, ComponentTag tag)
          Will be called in addition to Component.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 to Component.renderHead(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 to Component.renderHead(HtmlHeaderContainer) and allows the strategy to contribute to the <head> section of the response.

Parameters:
component - The component calling the strategy
container -
See Also:
Component.renderHead(HtmlHeaderContainer)

onComponentTag

void onComponentTag(Component component,
                    ComponentTag tag)
Will be called in addition to Component.onComponentTag(ComponentTag) and allows the strategy to modify the component's tag or any of the tag attributes.

Parameters:
component - The component calling the strategy
tag -
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 insight this method.

Parameters:
component - The component calling the strategy
markupStream -
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 component resolver 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)


Copyright © 2006-2011 Apache Software Foundation. All Rights Reserved.