public class InvokeActionEventListener extends DefaultPhaseListener implements javax.faces.event.SystemEventListener
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 and Description |
---|
InvokeActionEventListener()
This constructor instructs the
DefaultPhaseListener to hook on PhaseId.INVOKE_APPLICATION and
subscribes this instance as a SystemEventListener to the PostValidateEvent event. |
Modifier and Type | Method and Description |
---|---|
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(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. |
getPhaseId
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.public boolean isListenerForSource(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
Copyright © 2012–2014 OmniFaces. All rights reserved.