Class ChildFirstHeaderRenderStrategy
- java.lang.Object
-
- org.apache.wicket.markup.renderStrategy.AbstractHeaderRenderStrategy
-
- org.apache.wicket.markup.renderStrategy.ChildFirstHeaderRenderStrategy
-
- All Implemented Interfaces:
IHeaderRenderStrategy
public class ChildFirstHeaderRenderStrategy extends AbstractHeaderRenderStrategy
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
Constructors Constructor Description ChildFirstHeaderRenderStrategy()
Construct.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
renderChildHeaders(HtmlHeaderContainer headerContainer, Component rootComponent)
Render the child hierarchy headers.void
renderHeader(HtmlHeaderContainer headerContainer, HtmlHeaderContainer.HeaderStreamState headerStreamState, Component rootComponent)
Implements the render strategy-
Methods inherited from class org.apache.wicket.markup.renderStrategy.AbstractHeaderRenderStrategy
get, renderApplicationLevelHeaders, renderInlineEnclosure, renderRootComponent
-
-
-
-
Constructor Detail
-
ChildFirstHeaderRenderStrategy
public ChildFirstHeaderRenderStrategy()
Construct.
-
-
Method Detail
-
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
protected void renderChildHeaders(HtmlHeaderContainer headerContainer, Component rootComponent)
Render the child hierarchy headers.- Specified by:
renderChildHeaders
in classAbstractHeaderRenderStrategy
- Parameters:
headerContainer
-rootComponent
-
-
-