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 thesourceof this event instance is aUIComponentinstance 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 newBeforeRemoveFromViewthat indicates the argumentcomponentis about to be removed from the view.PreRemoveFromViewEvent(FacesContext facesContext, UIComponent component)Instantiate a newBeforeRemoveFromViewthat indicates the argumentcomponentis about to be removed from the view.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisAppropriateListener(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
BeforeRemoveFromViewthat indicates the argumentcomponentis about to be removed from the view.- Parameters:
component- theUIComponentthat is about to be removed from the view.- Throws:
IllegalArgumentException- ifcomponentisnull
-
PreRemoveFromViewEvent
public PreRemoveFromViewEvent(FacesContext facesContext, UIComponent component)
Instantiate a new
BeforeRemoveFromViewthat indicates the argumentcomponentis about to be removed from the view.- Parameters:
facesContext- the Faces context.component- theUIComponentthat is about to be removed from the view.- Throws:
IllegalArgumentException- ifcomponentisnull
-
-
Method Detail
-
isAppropriateListener
public boolean isAppropriateListener(FacesListener listener)
Returns
trueif and only if the argumentlisteneris an instance ofSystemEventListener.- Overrides:
isAppropriateListenerin classComponentSystemEvent- Parameters:
listener- the faces listener.- Returns:
- true if the listener is an appropriate one, false otherwise.
-
-