|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.omnifaces.eventlistener.DefaultPhaseListener org.omnifaces.eventlistener.InvokeActionEventListener
public class InvokeActionEventListener
This phase listener takes care that the PreInvokeActionEvent
and PostInvokeActionEvent
events are
properly published.
This phase listener is already registered by OmniFaces' own faces-config.xml
and thus gets
auto-initialized when the OmniFaces JAR is bundled in a webapp, so end-users do not need to register this phase
listener explicitly themselves.
PreInvokeActionEvent
,
PostInvokeActionEvent
,
Serialized FormConstructor Summary | |
---|---|
InvokeActionEventListener()
This constructor instructs the DefaultPhaseListener to hook on PhaseId.INVOKE_APPLICATION and
subscribes this instance as a SystemEventListener to the PostValidateEvent event. |
Method Summary | |
---|---|
void |
afterPhase(javax.faces.event.PhaseEvent event)
Publish the PostInvokeActionEvent event on the components which are been collected in
processEvent(SystemEvent) . |
void |
beforePhase(javax.faces.event.PhaseEvent event)
Publish the PreInvokeActionEvent event on the components which are been collected in
processEvent(SystemEvent) . |
boolean |
isListenerForSource(java.lang.Object source)
Returns true only when the given source is an instance of UIViewRoot , UIForm ,
UIInput or UICommand . |
void |
processEvent(javax.faces.event.SystemEvent event)
If the validation has not failed for the current faces context, then check if the UIComponent which
passed the isListenerForSource(Object) check has any listeners for the PreInvokeActionEvent
and/or PostInvokeActionEvent events and then add them to a set in the current faces context. |
Methods inherited from class org.omnifaces.eventlistener.DefaultPhaseListener |
---|
getPhaseId |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public InvokeActionEventListener()
DefaultPhaseListener
to hook on PhaseId.INVOKE_APPLICATION
and
subscribes this instance as a SystemEventListener
to the PostValidateEvent
event. This allows
collecting the components eligible for PreInvokeActionEvent
or PostInvokeActionEvent
inside the
processEvent(SystemEvent)
method.
Method Detail |
---|
public boolean isListenerForSource(java.lang.Object source)
true
only when the given source is an instance of UIViewRoot
, UIForm
,
UIInput
or UICommand
.
isListenerForSource
in interface javax.faces.event.SystemEventListener
public void processEvent(javax.faces.event.SystemEvent event) throws javax.faces.event.AbortProcessingException
UIComponent
which
passed the isListenerForSource(Object)
check has any listeners for the PreInvokeActionEvent
and/or PostInvokeActionEvent
events and then add them to a set in the current faces context.
processEvent
in interface javax.faces.event.SystemEventListener
javax.faces.event.AbortProcessingException
public void beforePhase(javax.faces.event.PhaseEvent event)
PreInvokeActionEvent
event on the components which are been collected in
processEvent(SystemEvent)
.
beforePhase
in interface javax.faces.event.PhaseListener
beforePhase
in class DefaultPhaseListener
public void afterPhase(javax.faces.event.PhaseEvent event)
PostInvokeActionEvent
event on the components which are been collected in
processEvent(SystemEvent)
.
afterPhase
in interface javax.faces.event.PhaseListener
afterPhase
in class DefaultPhaseListener
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |