javax.faces.component.behavior
Class BehaviorBase

java.lang.Object
  extended by javax.faces.component.behavior.BehaviorBase
All Implemented Interfaces:
Behavior, PartialStateHolder, StateHolder
Direct Known Subclasses:
ClientBehaviorBase

public class BehaviorBase
extends Object
implements Behavior, PartialStateHolder

BehaviorBase is a convenience base class that provides a default implementation of the Behavior contract. It also provides behavior listener registration and state saving support.

Since:
2.0

Constructor Summary
BehaviorBase()
           
 
Method Summary
 void broadcast(BehaviorEvent event)
          

Default implementation of Behavior.broadcast(javax.faces.event.BehaviorEvent).

 void clearInitialState()
          

Clears the initial state flag, causing the behavior to revert from partial to full state saving.

 boolean initialStateMarked()
          

Implementation of PartialStateHolder.initialStateMarked().

 boolean isTransient()
          

Implementation of StateHolder.isTransient().

 void markInitialState()
          

Implementation of PartialStateHolder.markInitialState().

 void restoreState(FacesContext context, Object state)
          

Implementation of StateHolder.restoreState(javax.faces.context.FacesContext, java.lang.Object).

 Object saveState(FacesContext context)
          

Implementation of StateHolder.saveState(javax.faces.context.FacesContext).

 void setTransient(boolean transientFlag)
          

Implementation of StateHolder.setTransient(boolean).

 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BehaviorBase

public BehaviorBase()
Method Detail

broadcast

public void broadcast(BehaviorEvent event)
               throws AbortProcessingException

Default implementation of Behavior.broadcast(javax.faces.event.BehaviorEvent). Delivers the specified BehaviorEvent to all registered BehaviorListener event listeners who have expressed an interest in events of this type. Listeners are called in the order in which they were registered (added).

Specified by:
broadcast in interface Behavior
Parameters:
event - The BehaviorEvent to be broadcast
Throws:
AbortProcessingException - Signal the JavaServer Faces implementation that no further processing on the current event should be performed
IllegalArgumentException - if the implementation class of this BehaviorEvent is not supported by this component
NullPointerException - if event is null
Since:
2.0

isTransient

public boolean isTransient()

Implementation of StateHolder.isTransient().

Specified by:
isTransient in interface StateHolder

setTransient

public void setTransient(boolean transientFlag)

Implementation of StateHolder.setTransient(boolean).

Specified by:
setTransient in interface StateHolder
Parameters:
transientFlag - boolean pass true if this Object will not participate in state saving or restoring, otherwise pass false.

saveState

public Object saveState(FacesContext context)

Implementation of StateHolder.saveState(javax.faces.context.FacesContext).

Specified by:
saveState in interface StateHolder

restoreState

public void restoreState(FacesContext context,
                         Object state)

Implementation of StateHolder.restoreState(javax.faces.context.FacesContext, java.lang.Object).

Specified by:
restoreState in interface StateHolder

markInitialState

public void markInitialState()

Implementation of PartialStateHolder.markInitialState().

Specified by:
markInitialState in interface PartialStateHolder

initialStateMarked

public boolean initialStateMarked()

Implementation of PartialStateHolder.initialStateMarked().

Specified by:
initialStateMarked in interface PartialStateHolder

clearInitialState

public void clearInitialState()

Clears the initial state flag, causing the behavior to revert from partial to full state saving.

Specified by:
clearInitialState in interface PartialStateHolder