org.apache.wicket.behavior
Class HeaderContributor

java.lang.Object
  extended by org.apache.wicket.behavior.AbstractBehavior
      extended by org.apache.wicket.behavior.AbstractHeaderContributor
          extended by org.apache.wicket.behavior.HeaderContributor
All Implemented Interfaces:
Serializable, IBehavior, IComponentConfigurationBehavior, IClusterable, IHeaderContributor

public class HeaderContributor
extends AbstractHeaderContributor

A AbstractHeaderContributor behavior that is specialized on package resources. If you use this class, you have to pre-register the resources you want to contribute.

Author:
Eelco Hillenius, Matej Knopp
See Also:
Serialized Form

Constructor Summary
HeaderContributor(IHeaderContributor headerContributor)
          Construct.
 
Method Summary
static HeaderContributor forCss(Class<?> scope, String path)
          Deprecated. please use CSSPackageResource.getHeaderContribution() instead
static HeaderContributor forCss(Class<?> scope, String path, String media)
          Deprecated. please use CSSPackageResource.getHeaderContribution() instead
static HeaderContributor forCss(ResourceReference reference)
          Deprecated. please use CSSPackageResource.getHeaderContribution() instead
static HeaderContributor forCss(ResourceReference reference, String media)
          Deprecated. please use CSSPackageResource.getHeaderContribution() instead
static HeaderContributor forCss(String location)
          Deprecated. please use CSSPackageResource.getHeaderContribution() instead
static HeaderContributor forCss(String location, String media)
          Deprecated. please use CSSPackageResource.getHeaderContribution() instead
static HeaderContributor forJavaScript(Class<?> scope, String path)
          Deprecated. please use JavascriptPackageResource.getHeaderContribution() instead
static HeaderContributor forJavaScript(ResourceReference reference)
          Deprecated. please use JavascriptPackageResource.getHeaderContribution() instead
static HeaderContributor forJavaScript(String location)
          Deprecated. please use JavascriptPackageResource.getHeaderContribution() instead
 IHeaderContributor[] getHeaderContributors()
          Gets the header contributors for this behavior.
 
Methods inherited from class org.apache.wicket.behavior.AbstractHeaderContributor
renderHead
 
Methods inherited from class org.apache.wicket.behavior.AbstractBehavior
afterRender, beforeRender, bind, cleanup, detach, detachModel, exception, getStatelessHint, isEnabled, isTemporary, onComponentTag, onConfigure, onException, onRendered, rendered
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HeaderContributor

public HeaderContributor(IHeaderContributor headerContributor)
Construct.

Parameters:
headerContributor - the header contributor
Method Detail

forCss

@Deprecated
public static final HeaderContributor forCss(Class<?> scope,
                                                        String path)
Deprecated. please use CSSPackageResource.getHeaderContribution() instead

Returns a new instance of HeaderContributor with a header contributor that references a CSS file that lives in a package.

Parameters:
scope - The scope of the package resource (typically the class of the caller, or a class that lives in the package where the resource lives).
path - The path
Returns:
the new header contributor instance

forCss

@Deprecated
public static final HeaderContributor forCss(Class<?> scope,
                                                        String path,
                                                        String media)
Deprecated. please use CSSPackageResource.getHeaderContribution() instead

Returns a new instance of HeaderContributor with a header contributor that references a CSS file that lives in a package.

Parameters:
scope - The scope of the package resource (typically the class of the caller, or a class that lives in the package where the resource lives).
path - The path
media - The media type for this CSS ("print", "screen", etc.)
Returns:
the new header contributor instance

forCss

@Deprecated
public static final HeaderContributor forCss(ResourceReference reference)
Deprecated. please use CSSPackageResource.getHeaderContribution() instead

Returns a new instance of HeaderContributor with a header contributor that references a CSS file that lives in a package.

Parameters:
reference -
Returns:
the new header contributor instance

forCss

@Deprecated
public static final HeaderContributor forCss(ResourceReference reference,
                                                        String media)
Deprecated. please use CSSPackageResource.getHeaderContribution() instead

Returns a new instance of HeaderContributor with a header contributor that references a CSS file that lives in a package.

Parameters:
reference -
media - The media type for this CSS ("print", "screen", etc.)
Returns:
the new header contributor instance

forCss

@Deprecated
public static final HeaderContributor forCss(String location)
Deprecated. please use CSSPackageResource.getHeaderContribution() instead

Returns a new instance of HeaderContributor with a header contributor referencing a CSS file using one of the following schemes:

Parameters:
location - The location of the css file.
Returns:
the new header contributor instance

forCss

@Deprecated
public static final HeaderContributor forCss(String location,
                                                        String media)
Deprecated. please use CSSPackageResource.getHeaderContribution() instead

Returns a new instance of HeaderContributor with a header contributor referencing a CSS file using one of the following schemes:

Parameters:
location - The location of the css.
media - The media type for this CSS ("print", "screen", etc.)
Returns:
the new header contributor instance

forJavaScript

@Deprecated
public static final HeaderContributor forJavaScript(Class<?> scope,
                                                               String path)
Deprecated. please use JavascriptPackageResource.getHeaderContribution() instead

Returns a new instance of HeaderContributor with a header contributor that references a java script file that lives in a package.

Parameters:
scope - The scope of the package resource (typically the class of the caller, or a class that lives in the package where the resource lives).
path - The path
Returns:
the new header contributor instance

forJavaScript

@Deprecated
public static final HeaderContributor forJavaScript(ResourceReference reference)
Deprecated. please use JavascriptPackageResource.getHeaderContribution() instead

Returns a new instance of HeaderContributor with a header contributor that references a java script file that lives in a package.

Parameters:
reference -
Returns:
the new header contributor instance

forJavaScript

@Deprecated
public static final HeaderContributor forJavaScript(String location)
Deprecated. please use JavascriptPackageResource.getHeaderContribution() instead

Returns a new instance of HeaderContributor with a header contributor referencing a java script file using one of the following schemes:

Parameters:
location - The location of the java script file.
Returns:
the new header contributor instance

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()


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