org.apache.wicket.behavior
Class StringHeaderContributor

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

public class StringHeaderContributor
extends AbstractHeaderContributor

A simple header contributor that just spits out the string it is constructed with as a header contribution.

Author:
Eelco Hillenius
See Also:
Serialized Form

Constructor Summary
StringHeaderContributor(IModel contribution)
          Construct.
StringHeaderContributor(java.lang.String contribution)
          Construct.
 
Method Summary
 void detach(Component component)
          Allows the behavior to detach any state it has attached during request processing.
 IHeaderContributor[] getHeaderContributors()
          Gets the header contributors for this behavior.
 java.lang.String toString()
           
 
Methods inherited from class org.apache.wicket.behavior.AbstractHeaderContributor
renderHead
 
Methods inherited from class org.apache.wicket.behavior.AbstractBehavior
afterRender, beforeRender, bind, cleanup, detachModel, exception, getStatelessHint, isEnabled, isTemporary, onComponentTag, onException, onRendered, rendered
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StringHeaderContributor

public StringHeaderContributor(java.lang.String contribution)
Construct.

Parameters:
contribution - header contribution as a plain string

StringHeaderContributor

public StringHeaderContributor(IModel contribution)
Construct.

Parameters:
contribution - header contribution as a model that returns a plain string
Method Detail

getHeaderContributors

public final IHeaderContributor[] getHeaderContributors()
Description copied from class: AbstractHeaderContributor
Gets the header contributors for this behavior.

Specified by:
getHeaderContributors in class AbstractHeaderContributor
Returns:
the header contributors; may return null if there are none
See Also:
AbstractHeaderContributor.getHeaderContributors()

detach

public void detach(Component component)
Description copied from interface: IBehavior
Allows the behavior to detach any state it has attached during request processing.

Specified by:
detach in interface IBehavior
Overrides:
detach in class AbstractBehavior
Parameters:
component - the component that initiates the detachment of this behavior
See Also:
AbstractBehavior.detach(org.apache.wicket.Component)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
See Also:
Object.toString()


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