|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.richfaces.event.MethodExpressionEventListener
public abstract class MethodExpressionEventListener
MethodExpressionEventListener
is a FacesListener
that wraps a MethodExpression
. When it receives a FacesEvent
, it
executes a method on an object identified by the MethodExpression
.
Constructor Summary | |
---|---|
protected |
MethodExpressionEventListener()
|
protected |
MethodExpressionEventListener(javax.el.MethodExpression methodExpressionOneArg)
Construct a FacesListener that contains a MethodExpression .To accomodate method expression targets
that take no arguments instead of taking a FacesEvent argument, the implementation of this
class must take the argument methodExpressionOneArg ,
extract its expression string, and create another
MethodExpression whose expected param types match
those of a zero argument method. |
protected |
MethodExpressionEventListener(javax.el.MethodExpression methodExprOneArg,
javax.el.MethodExpression methodExprZeroArg)
Construct a FacesListener that contains a MethodExpression . |
Method Summary | |
---|---|
boolean |
isTransient()
|
void |
processEvent(javax.faces.event.FacesEvent event)
Call through to the MethodExpression passed in our constructor. |
void |
restoreState(javax.faces.context.FacesContext context,
Object state)
Both |
Object |
saveState(javax.faces.context.FacesContext context)
Both |
void |
setTransient(boolean newTransientValue)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected MethodExpressionEventListener()
protected MethodExpressionEventListener(javax.el.MethodExpression methodExpressionOneArg)
Construct a FacesListener
that contains a MethodExpression
.To accomodate method expression targets
that take no arguments instead of taking a FacesEvent
argument, the implementation of this
class must take the argument methodExpressionOneArg
,
extract its expression string, and create another
MethodExpression
whose expected param types match
those of a zero argument method. The usage requirements for both
of these MethodExpression
instances are described in
processEvent(javax.faces.event.FacesEvent)
.
methodExpressionOneArg
- a MethodExpression
that points to a method that returns void
and takes
a single argument of type FacesEvent
.protected MethodExpressionEventListener(javax.el.MethodExpression methodExprOneArg, javax.el.MethodExpression methodExprZeroArg)
Construct a FacesListener
that contains a MethodExpression
.
methodExprOneArg
- methodExprZeroArg
- Method Detail |
---|
public void processEvent(javax.faces.event.FacesEvent event) throws javax.faces.event.AbortProcessingException
Call through to the
MethodExpression
passed in our constructor. First, try to invoke the
MethodExpression
passed to the constructor of this
instance, passing the argument FacesEvent
as the
argument. If a MethodNotFoundException
is thrown, call
to the zero argument MethodExpression
derived from
the MethodExpression
passed to the constructor of
this instance. If that fails for any reason, throw an AbortProcessingException
, including the cause of the
failure.
NullPointerException
javax.faces.event.AbortProcessingException
public Object saveState(javax.faces.context.FacesContext context)
Both MethodExpression
instances described in the constructor must be saved.
saveState
in interface javax.faces.component.StateHolder
public void restoreState(javax.faces.context.FacesContext context, Object state)
Both MethodExpression
instances described in the constructor must be restored.
restoreState
in interface javax.faces.component.StateHolder
public boolean isTransient()
isTransient
in interface javax.faces.component.StateHolder
public void setTransient(boolean newTransientValue)
setTransient
in interface javax.faces.component.StateHolder
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |