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
 boolean equals(java.lang.Object obj)
           
 int hashCode()
           
 void renderHead(IHeaderResponse response)
          Render to the web response whatever the component wants to contribute to the head section.
 java.lang.String toString()
           
 
Methods inherited from class org.apache.wicket.behavior.AbstractHeaderContributor
returnRelativePath
 
Methods inherited from class org.apache.wicket.behavior.AbstractBehavior
afterRender, beforeRender, bind, cleanup, detach, exception, getStatelessHint, isEnabled, isTemporary, onComponentTag, onException, onRendered, unbind
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StringHeaderContributor

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

Parameters:
contribution - The contribution as a plain string

StringHeaderContributor

public StringHeaderContributor(IModel<?> contribution)
Construct.

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

renderHead

public void renderHead(IHeaderResponse response)
Description copied from interface: IHeaderContributor
Render to the web response whatever the component wants to contribute to the head section. TODO: Post 1.3, add component parameter, so that the behaviors dont' have to track component instances

Specified by:
renderHead in interface IHeaderContributor
Specified by:
renderHead in class AbstractHeaderContributor
Parameters:
response - Response object
See Also:
IHeaderContributor.renderHead(org.apache.wicket.markup.html.IHeaderResponse)

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object
See Also:
Object.hashCode()

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object
See Also:
Object.equals(java.lang.Object)

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.