wicket.behavior
Class StringHeaderContributor

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

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 detachModel(Component component)
          Provides for the ability to detach any models this behavior has.
 IHeaderContributor[] getHeaderContributors()
          Gets the header contributors for this behavior.
 java.lang.String toString()
           
 
Methods inherited from class wicket.behavior.AbstractHeaderContributor
cleanup, renderHead
 
Methods inherited from class wicket.behavior.AbstractBehavior
bind, exception, 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()

detachModel

public void detachModel(Component component)
Description copied from interface: IBehavior
Provides for the ability to detach any models this behavior has. This method is called by the components which have this behavior attached to them when they are detaching their models themselves (ie after rendering). Note that if you share a behavior between components, this method is called multiple times. YOU MUST CALL SUPER WHEN IMPLEMENTING THIS METHOD

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

toString

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


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