org.efaps.ui.wicket.resources
Class StaticHeaderContributor

java.lang.Object
  extended by org.apache.wicket.behavior.AbstractBehavior
      extended by org.apache.wicket.behavior.AbstractHeaderContributor
          extended by org.apache.wicket.behavior.HeaderContributor
              extended by org.efaps.ui.wicket.resources.StaticHeaderContributor
All Implemented Interfaces:
java.io.Serializable, org.apache.wicket.behavior.IBehavior, org.apache.wicket.IClusterable, org.apache.wicket.markup.html.IHeaderContributor

public class StaticHeaderContributor
extends org.apache.wicket.behavior.HeaderContributor

A HeaderContributor for Content wich is stored inside the eFaps-DataBase.
Unlike other HeaderContributor the Instance of StaticHeaderContributor migtht be removed on rendering from the component to merge it with other StaticHeaderContributor and added as a new merged StaticHeaderContributor to a ParentComponent. To prevent a StaticHeaderContributor from merging for e.g. keep the Sequence of Behaviors in a Compoment merged must be set to true.

Version:
$Id: StaticHeaderContributor.java 3447 2009-11-29 22:46:39Z tim.moxter $
Author:
jmox
See Also:
Serialized Form

Nested Class Summary
static class StaticHeaderContributor.HeaderType
          this enum is used to distinguish between the different Types of the Header.
 
Constructor Summary
StaticHeaderContributor(org.apache.wicket.markup.html.IHeaderContributor _headerContributor, EFapsContentReference _reference)
          Constructor setting the IHeaderContributor in the SuperClass and the Reference.
 
Method Summary
 void bind(org.apache.wicket.Component _component)
          (non-Javadoc).
static StaticHeaderContributor forCss(EFapsContentReference _reference)
          Static method to get a StaticHeaderContributor for CSS that will be merged.
static StaticHeaderContributor forCss(EFapsContentReference _reference, boolean _merged)
          Static method to get a StaticHeaderContributor for CSS.
static StaticHeaderContributor forJavaScript(EFapsContentReference _reference)
          Static method to get a StaticHeaderContributor for JavaScript that will be merged.
static StaticHeaderContributor forJavaScript(EFapsContentReference _reference, boolean _nomerge)
          * Static method to get a StaticHeaderContributor for JavaScript.
 org.apache.wicket.Component getComponent()
          This is the getter method for the instance variable component.
 StaticHeaderContributor.HeaderType getHeaderType()
          This is the getter method for the instance variable headerType.
 EFapsContentReference getReference()
          This is the getter method for the instance variable reference.
 boolean isMerged()
          This is the getter method for the instance variable merged.
 void setHeaderType(StaticHeaderContributor.HeaderType _headerType)
          This is the setter method for the instance variable headerType.
 void setMerged(boolean _merged)
          This is the setter method for the instance variable merged.
 
Methods inherited from class org.apache.wicket.behavior.HeaderContributor
forCss, forCss, forCss, forCss, forCss, forCss, forJavaScript, forJavaScript, forJavaScript, getHeaderContributors
 
Methods inherited from class org.apache.wicket.behavior.AbstractHeaderContributor
renderHead
 
Methods inherited from class org.apache.wicket.behavior.AbstractBehavior
afterRender, beforeRender, cleanup, detach, detachModel, exception, getStatelessHint, isEnabled, isTemporary, onComponentTag, onException, onRendered, rendered
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StaticHeaderContributor

public StaticHeaderContributor(org.apache.wicket.markup.html.IHeaderContributor _headerContributor,
                               EFapsContentReference _reference)
Constructor setting the IHeaderContributor in the SuperClass and the Reference.

Parameters:
_headerContributor - IHeaderContributor
_reference - EFapsContentReference
Method Detail

forCss

public static final StaticHeaderContributor forCss(EFapsContentReference _reference)
Static method to get a StaticHeaderContributor for CSS that will be merged.

Parameters:
_reference - Reference to the Content
Returns:
StaticHeaderContributor

forCss

public static final StaticHeaderContributor forCss(EFapsContentReference _reference,
                                                   boolean _merged)
Static method to get a StaticHeaderContributor for CSS.

Parameters:
_reference - Reference to the Content
_merged - should this StaticHeaderContributor merged
Returns:
StaticHeaderContributor

forJavaScript

public static final StaticHeaderContributor forJavaScript(EFapsContentReference _reference)
Static method to get a StaticHeaderContributor for JavaScript that will be merged.

Parameters:
_reference - Reference to the Content
Returns:
StaticHeaderContributor

forJavaScript

public static final StaticHeaderContributor forJavaScript(EFapsContentReference _reference,
                                                          boolean _nomerge)
* Static method to get a StaticHeaderContributor for JavaScript.

Parameters:
_reference - Reference to the Content
_nomerge - should this StaticHeaderContributor not bemerged
Returns:
StaticHeaderContributor

isMerged

public boolean isMerged()
This is the getter method for the instance variable merged.

Returns:
value of instance variable merged

bind

public void bind(org.apache.wicket.Component _component)
(non-Javadoc).

Specified by:
bind in interface org.apache.wicket.behavior.IBehavior
Overrides:
bind in class org.apache.wicket.behavior.AbstractBehavior
Parameters:
_component - Component
See Also:
AbstractBehavior.bind(org.apache.wicket.Component)

setMerged

public void setMerged(boolean _merged)
This is the setter method for the instance variable merged.

Parameters:
_merged - the merged to set

getComponent

public org.apache.wicket.Component getComponent()
This is the getter method for the instance variable component.

Returns:
value of instance variable component

getReference

public EFapsContentReference getReference()
This is the getter method for the instance variable reference.

Returns:
value of instance variable reference

getHeaderType

public StaticHeaderContributor.HeaderType getHeaderType()
This is the getter method for the instance variable headerType.

Returns:
value of instance variable headerType

setHeaderType

public void setHeaderType(StaticHeaderContributor.HeaderType _headerType)
This is the setter method for the instance variable headerType.

Parameters:
_headerType - the headerType to set


Copyright © 2003-2010 The eFaps Team. All Rights Reserved.