org.apache.wicket.markup.renderStrategy
Class ChildFirstHeaderRenderStrategy

java.lang.Object
  extended by org.apache.wicket.markup.renderStrategy.AbstractHeaderRenderStrategy
      extended by 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
ChildFirstHeaderRenderStrategy()
          Construct.
 
Method Summary
protected  void renderChildHeaders(HtmlHeaderContainer headerContainer, Component rootComponent)
          Render the child hierarchy headers.
 void renderHeader(HtmlHeaderContainer headerContainer, Component rootComponent)
          Implements the render strategy
 
Methods inherited from class org.apache.wicket.markup.renderStrategy.AbstractHeaderRenderStrategy
get, renderApplicationLevelHeaders, renderRootComponent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChildFirstHeaderRenderStrategy

public ChildFirstHeaderRenderStrategy()
Construct.

Method Detail

renderHeader

public void renderHeader(HtmlHeaderContainer headerContainer,
                         Component rootComponent)
Description copied from interface: IHeaderRenderStrategy
Implements the render strategy

Specified by:
renderHeader in interface IHeaderRenderStrategy
Overrides:
renderHeader in class AbstractHeaderRenderStrategy
Parameters:
headerContainer - The HeaderContainer associated to the response
rootComponent - 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 class AbstractHeaderRenderStrategy
Parameters:
headerContainer -
rootComponent -


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