Class ChildFirstHeaderRenderStrategy
java.lang.Object
org.apache.wicket.markup.renderStrategy.AbstractHeaderRenderStrategy
org.apache.wicket.markup.renderStrategy.ChildFirstHeaderRenderStrategy
- All Implemented Interfaces:
IHeaderRenderStrategy
This a header render strategy implements a child->parent->root sequence, which is inverse to how
it was until Wicket 1.5. It now allows parent containers to replace child contributions, since
their contribution is added to the markup after the child ones (see WICKET-2693).
Please note that irrespective of the render strategy, if the same header content (e.g. CSS file)
gets added twice to the header, only the first will be rendered and the 2nd will be skipped.
- Author:
- Juergen Donnerstag
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
renderChildHeaders
(HtmlHeaderContainer headerContainer, Component rootComponent) Render the child hierarchy headers.void
renderHeader
(HtmlHeaderContainer headerContainer, HtmlHeaderContainer.HeaderStreamState headerStreamState, Component rootComponent) Implements the render strategyMethods inherited from class org.apache.wicket.markup.renderStrategy.AbstractHeaderRenderStrategy
get, renderApplicationLevelHeaders, renderInlineEnclosure, renderRootComponent
-
Constructor Details
-
ChildFirstHeaderRenderStrategy
public ChildFirstHeaderRenderStrategy()Construct.
-
-
Method Details
-
renderHeader
public void renderHeader(HtmlHeaderContainer headerContainer, HtmlHeaderContainer.HeaderStreamState headerStreamState, Component rootComponent) Description copied from interface:IHeaderRenderStrategy
Implements the render strategy- Specified by:
renderHeader
in interfaceIHeaderRenderStrategy
- Overrides:
renderHeader
in classAbstractHeaderRenderStrategy
- Parameters:
headerContainer
- The HeaderContainer associated to the responseheaderStreamState
- the header section of the page, when null, this section will not be renderedrootComponent
- The root component (e.g. Page) to start the render process
-
renderChildHeaders
Render the child hierarchy headers.- Specified by:
renderChildHeaders
in classAbstractHeaderRenderStrategy
- Parameters:
headerContainer
-rootComponent
-
-