|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.faces.component.behavior.BehaviorBase
public class BehaviorBase
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.
Constructor Summary | |
---|---|
BehaviorBase()
|
Method Summary | |
---|---|
protected void |
addBehaviorListener(BehaviorListener listener)
Add the specified |
void |
broadcast(BehaviorEvent event)
Default implementation of
|
void |
clearInitialState()
Clears the initial state flag, causing the behavior to revert from partial to full state saving. |
boolean |
initialStateMarked()
Implementation of
|
boolean |
isTransient()
Implementation of
|
void |
markInitialState()
Implementation of
|
protected void |
removeBehaviorListener(BehaviorListener listener)
Remove the specified
|
void |
restoreState(FacesContext context,
java.lang.Object state)
Implementation of
|
java.lang.Object |
saveState(FacesContext context)
Implementation of
|
void |
setTransient(boolean transientFlag)
Implementation of
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BehaviorBase()
Method Detail |
---|
public void broadcast(BehaviorEvent event) throws AbortProcessingException
Default implementation of
Behavior#broadcast
. 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).
broadcast
in interface Behavior
event
- The BehaviorEvent
to be broadcast
AbortProcessingException
- Signal the JavaServer Faces
implementation that no further processing on the current event
should be performed
java.lang.IllegalArgumentException
- if the implementation class
of this BehaviorEvent
is not supported by this component
java.lang.NullPointerException
- if event
is
null
public boolean isTransient()
Implementation of
StateHolder.isTransient()
.
isTransient
in interface StateHolder
public void setTransient(boolean transientFlag)
Implementation of
StateHolder.setTransient(boolean)
.
setTransient
in interface StateHolder
transientFlag
- boolean pass true
if this Object
will participate in state saving or restoring, otherwise
pass false
.public java.lang.Object saveState(FacesContext context)
Implementation of
StateHolder.saveState(javax.faces.context.FacesContext)
.
saveState
in interface StateHolder
public void restoreState(FacesContext context, java.lang.Object state)
Implementation of
StateHolder.restoreState(javax.faces.context.FacesContext, java.lang.Object)
.
restoreState
in interface StateHolder
public void markInitialState()
Implementation of
PartialStateHolder.markInitialState()
.
markInitialState
in interface PartialStateHolder
public boolean initialStateMarked()
Implementation of
PartialStateHolder.initialStateMarked()
.
initialStateMarked
in interface PartialStateHolder
public void clearInitialState()
Clears the initial state flag, causing the behavior to revert from partial to full state saving.
clearInitialState
in interface PartialStateHolder
protected void addBehaviorListener(BehaviorListener listener)
Add the specified BehaviorListener
to the set of listeners registered to receive event notifications
from this Behavior
.
It is expected that Behavior
classes acting as event sources
will have corresponding typesafe APIs for registering listeners of the
required type, and the implementation of those registration methods
will delegate to this method. For example:
public class AjaxBehaviorEvent extends BehaviorEvent { ... } public interface AjaxBehaviorListener extends BehaviorListener { public void processAjaxBehavior(FooEvent event); } public class AjaxBehavior extends ClientBehaviorBase { ... public void addAjaxBehaviorListener(AjaxBehaviorListener listener) { addBehaviorListener(listener); } public void removeAjaxBehaviorListener(AjaxBehaviorListener listener) { removeBehaviorListener(listener); } ... }
listener
- The BehaviorListener
to be registered
java.lang.NullPointerException
- if listener
is null
protected void removeBehaviorListener(BehaviorListener listener)
Remove the specified
BehaviorListener
from the set of listeners
registered to receive event notifications from this
Behavior
.
listener
- The BehaviorListener
to be deregistered
java.lang.NullPointerException
- if listener
is null
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2009, 2010, Oracle Corporation and/or its affiliates. All Rights Reserved. Use is subject to license terms.
Generated on 4-June-2010 04:34