Class PreRemoveFromViewEvent
- java.lang.Object
-
- java.util.EventObject
-
- jakarta.faces.event.SystemEvent
-
- jakarta.faces.event.ComponentSystemEvent
-
- jakarta.faces.event.PreRemoveFromViewEvent
-
- All Implemented Interfaces:
Serializable
public class PreRemoveFromViewEvent extends ComponentSystemEvent
When an instance of this event is passed to
SystemEventListener.processEvent(jakarta.faces.event.SystemEvent)
orComponentSystemEventListener.processEvent(jakarta.faces.event.ComponentSystemEvent)
, the listener implementation may assume that thesource
of this event instance is aUIComponent
instance that is about to be removed from the view. Therefore, the implementation may assume it is safe to callUIComponent.getParent()
,UIComponent.getClientId()
, and other methods that depend upon the component instance being added into the view.- Since:
- 2.0
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class java.util.EventObject
source
-
-
Constructor Summary
Constructors Constructor Description PreRemoveFromViewEvent(UIComponent component)
Instantiate a newBeforeRemoveFromView
that indicates the argumentcomponent
is about to be removed from the view.PreRemoveFromViewEvent(FacesContext facesContext, UIComponent component)
Instantiate a newBeforeRemoveFromView
that indicates the argumentcomponent
is about to be removed from the view.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isAppropriateListener(FacesListener listener)
-
Methods inherited from class jakarta.faces.event.ComponentSystemEvent
getComponent, processListener
-
Methods inherited from class jakarta.faces.event.SystemEvent
getFacesContext
-
Methods inherited from class java.util.EventObject
getSource, toString
-
-
-
-
Constructor Detail
-
PreRemoveFromViewEvent
public PreRemoveFromViewEvent(UIComponent component)
Instantiate a new
BeforeRemoveFromView
that indicates the argumentcomponent
is about to be removed from the view.- Parameters:
component
- theUIComponent
that is about to be removed from the view.- Throws:
IllegalArgumentException
- ifcomponent
isnull
-
PreRemoveFromViewEvent
public PreRemoveFromViewEvent(FacesContext facesContext, UIComponent component)
Instantiate a new
BeforeRemoveFromView
that indicates the argumentcomponent
is about to be removed from the view.- Parameters:
facesContext
- the Faces context.component
- theUIComponent
that is about to be removed from the view.- Throws:
IllegalArgumentException
- ifcomponent
isnull
-
-
Method Detail
-
isAppropriateListener
public boolean isAppropriateListener(FacesListener listener)
Returns
true
if and only if the argumentlistener
is an instance ofSystemEventListener
.- Overrides:
isAppropriateListener
in classComponentSystemEvent
- Parameters:
listener
- the faces listener.- Returns:
- true if the listener is an appropriate one, false otherwise.
-
-