Package jakarta.faces.event
Class ComponentSystemEvent
- java.lang.Object
-
- java.util.EventObject
-
- jakarta.faces.event.SystemEvent
-
- jakarta.faces.event.ComponentSystemEvent
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
PostAddToViewEvent,PostConstructViewMapEvent,PostRenderViewEvent,PostRestoreStateEvent,PostValidateEvent,PreDestroyViewMapEvent,PreRemoveFromViewEvent,PreRenderComponentEvent,PreRenderViewEvent,PreValidateEvent
public abstract class ComponentSystemEvent extends SystemEvent
ComponentSystemEvent is the base class for
SystemEvents that are specific to aUIComponentinstance.- Since:
- 2.0
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class java.util.EventObject
source
-
-
Constructor Summary
Constructors Constructor Description ComponentSystemEvent(UIComponent component)Pass the argumentcomponentto the superclass constructor.ComponentSystemEvent(FacesContext facesContext, UIComponent component)Pass the argumentcomponentto the superclass constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description UIComponentgetComponent()the sourceUIComponentthat sent this event.booleanisAppropriateListener(FacesListener listener)Returntrueif the argumentFacesListeneris an instance of the appropriate listener class that this event supports.voidprocessListener(FacesListener listener)Broadcast this event instance to the specifiedFacesListenerby calling the superclass'sprocessListener()implementation.-
Methods inherited from class jakarta.faces.event.SystemEvent
getFacesContext
-
Methods inherited from class java.util.EventObject
getSource, toString
-
-
-
-
Constructor Detail
-
ComponentSystemEvent
public ComponentSystemEvent(UIComponent component)
Pass the argument
componentto the superclass constructor.- Parameters:
component- theUIComponentreference to be passed to the superclass constructor.- Throws:
IllegalArgumentException- if the argument isnull.- Since:
- 2.0
-
ComponentSystemEvent
public ComponentSystemEvent(FacesContext facesContext, UIComponent component)
Pass the argument
componentto the superclass constructor.- Parameters:
facesContext- the Faces context.component- theUIComponentreference to be passed to the superclass constructor.- Throws:
IllegalArgumentException- if the argument isnull.- Since:
- 2.0
-
-
Method Detail
-
isAppropriateListener
public boolean isAppropriateListener(FacesListener listener)
Return
trueif the argumentFacesListeneris an instance of the appropriate listener class that this event supports. The default implementation returns true if the listener is aComponentSystemEventListeneror ifsuper.isAppropriateListener()returns true.- Overrides:
isAppropriateListenerin classSystemEvent- Parameters:
listener-FacesListenerto evaluate- Returns:
- the result as specified above
- Since:
- 2.2
-
processListener
public void processListener(FacesListener listener)
Broadcast this event instance to the specified
FacesListenerby calling the superclass'sprocessListener()implementation.- Overrides:
processListenerin classSystemEvent- Parameters:
listener-FacesListenerto evaluate- Since:
- 2.2
-
getComponent
public UIComponent getComponent()
the source
UIComponentthat sent this event.- Returns:
- the component for this event
- Since:
- 2.0
-
-