wicket.behavior
Class AbstractHeaderContributor

java.lang.Object
  extended by wicket.behavior.AbstractBehavior
      extended by wicket.behavior.AbstractHeaderContributor
All Implemented Interfaces:
java.io.Serializable, IBehavior, IHeaderContributor
Direct Known Subclasses:
HeaderContributor, StringHeaderContributor

public abstract class AbstractHeaderContributor
extends AbstractBehavior
implements IHeaderContributor

Behaviour that delegates header contribution to a number of other contributors. It checks the contributions that were made in the same request to avoid double contributions.

Author:
Eelco Hillenius
See Also:
Serialized Form

Constructor Summary
AbstractHeaderContributor()
          Construct.
 
Method Summary
 void cleanup()
          This method is called either by AbstractBehavior.onRendered(Component) or AbstractBehavior.onException(Component, RuntimeException) AFTER they called their respective template methods.
abstract  IHeaderContributor[] getHeaderContributors()
          Gets the header contributors for this behavior.
 void renderHead(Response response)
          Render to the web response whatever the component wants to contribute to the head section.
 
Methods inherited from class wicket.behavior.AbstractBehavior
bind, detachModel, exception, onComponentTag, onException, onRendered, rendered
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractHeaderContributor

public AbstractHeaderContributor()
Construct.

Method Detail

getHeaderContributors

public abstract IHeaderContributor[] getHeaderContributors()
Gets the header contributors for this behavior.

Returns:
the header contributors; may return null if there are none

renderHead

public final void renderHead(Response response)
Description copied from interface: IHeaderContributor
Render to the web response whatever the component wants to contribute to the head section.

Note: This method is kind of dangerous as users are able to write to the output whatever they like.

Specified by:
renderHead in interface IHeaderContributor
Parameters:
response - Response object
See Also:
IHeaderContributor.renderHead(wicket.Response)

cleanup

public final void cleanup()
Description copied from class: AbstractBehavior
This method is called either by AbstractBehavior.onRendered(Component) or AbstractBehavior.onException(Component, RuntimeException) AFTER they called their respective template methods. Override this template method to do any necessary cleanup.

Overrides:
cleanup in class AbstractBehavior
See Also:
AbstractBehavior.cleanup()


Copyright © 2004-2007 Wicket developers. All Rights Reserved.