org.apache.wicket.markup.renderStrategy
Class AbstractHeaderRenderStrategy

java.lang.Object
  extended by org.apache.wicket.markup.renderStrategy.AbstractHeaderRenderStrategy
All Implemented Interfaces:
IHeaderRenderStrategy
Direct Known Subclasses:
ChildFirstHeaderRenderStrategy, ParentFirstHeaderRenderStrategy

public abstract class AbstractHeaderRenderStrategy
extends Object
implements IHeaderRenderStrategy

An abstract implementation of a header render strategy which is only missing the code to traverse the child hierarchy, since the sequence of that traversal is what will make the difference between the different header render strategies. Beside the child hierarchy the render sequence by default (may be changed via subclassing) is as follows:

Author:
Juergen Donnerstag

Constructor Summary
AbstractHeaderRenderStrategy()
          Construct.
 
Method Summary
 void addListener(IHeaderContributor contributor)
          Add an application level contributor who's content will be added to any page or ajax response.
static IHeaderRenderStrategy get()
           
 void removeListener(IHeaderContributor contributor)
          Remove an application level contributor
protected  void renderApplicationLevelHeaders(HtmlHeaderContainer headerContainer)
          Render the application level headers
protected abstract  void renderChildHeaders(HtmlHeaderContainer headerContainer, Component rootComponent)
          Render the child hierarchy headers.
 void renderHeader(HtmlHeaderContainer headerContainer, Component rootComponent)
          Implements the render strategy
protected  void renderRootComponent(HtmlHeaderContainer headerContainer, Component rootComponent)
          Render the root component (e.g.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractHeaderRenderStrategy

public AbstractHeaderRenderStrategy()
Construct.

Method Detail

get

public static IHeaderRenderStrategy get()
Returns:
Gets the strategy registered with the application

renderHeader

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

Specified by:
renderHeader in interface IHeaderRenderStrategy
See Also:
IHeaderRenderStrategy.renderHeader(org.apache.wicket.markup.html.internal.HtmlHeaderContainer, org.apache.wicket.Component)

renderRootComponent

protected void renderRootComponent(HtmlHeaderContainer headerContainer,
                                   Component rootComponent)
Render the root component (e.g. Page).

Parameters:
headerContainer -
rootComponent -

renderChildHeaders

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

Parameters:
headerContainer -
rootComponent -

renderApplicationLevelHeaders

protected final void renderApplicationLevelHeaders(HtmlHeaderContainer headerContainer)
Render the application level headers

Parameters:
headerContainer -

addListener

public final void addListener(IHeaderContributor contributor)
Add an application level contributor who's content will be added to any page or ajax response.

Parameters:
contributor -

removeListener

public void removeListener(IHeaderContributor contributor)
Remove an application level contributor

Parameters:
contributor -


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