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 IS EXPERIMENTAL ONLY. YOU MUST NOT USE IT IN YOUR APPLICATION. SOME WICKET CORE COMPONENT WILL NOT WORK PROPERLY. THIS CLASS MAY AS WELL BE REMOVED AGAIN. This a header render strategy which sequence is child->parent->root, and thus inverse to Wicket's default implementation. To your application it means, that parent containers can effectively replace child contributions, since their contribution is added to the markup after the child ones. 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 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
protected  boolean stopTraversingAfter(Component component)
          In case you need mixed strategies depending on the component, you can subclass this method and return true when traversing shall stop of that specific component.
protected  boolean stopTraversingBefore(Component component)
          In case you need mixed strategies depending on the component, you can subclass this method and return true when traversing shall stop of that specific component.
 
Methods inherited from class org.apache.wicket.markup.renderStrategy.AbstractHeaderRenderStrategy
addListener, get, removeListener, 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
See Also:
AbstractHeaderRenderStrategy.renderHeader(org.apache.wicket.markup.html.internal.HtmlHeaderContainer, org.apache.wicket.Component)

renderChildHeaders

protected void renderChildHeaders(HtmlHeaderContainer headerContainer,
                                  Component rootComponent)
Render the child hierarchy headers.

Specified by:
renderChildHeaders in class AbstractHeaderRenderStrategy
Parameters:
headerContainer -
rootComponent -

stopTraversingBefore

protected boolean stopTraversingBefore(Component component)
In case you need mixed strategies depending on the component, you can subclass this method and return true when traversing shall stop of that specific component. This check happens before the component's header gets rendered

Parameters:
component -
Returns:
true, if traversal shall stop with that component

stopTraversingAfter

protected boolean stopTraversingAfter(Component component)
In case you need mixed strategies depending on the component, you can subclass this method and return true when traversing shall stop of that specific component. This check happens after the component's header gets rendered

Parameters:
component -
Returns:
true, if traversal shall stop with that component


Copyright © 2004-2010 Apache Software Foundation. All Rights Reserved.