Package com.vaadin.flow.component
Class AttachEvent
java.lang.Object
java.util.EventObject
com.vaadin.flow.component.ComponentEvent<Component>
com.vaadin.flow.component.internal.AbstractAttachDetachEvent
com.vaadin.flow.component.AttachEvent
- All Implemented Interfaces:
Serializable
Event fired after a
Component is attached to the UI.
When a hierarchy of components is being attached, this event is fired child-first.
- Since:
- 1.0
- See Also:
-
Field Summary
Fields inherited from class java.util.EventObject
source -
Constructor Summary
ConstructorsConstructorDescriptionAttachEvent(Component source, boolean initialAttach) Creates a new attach event with the given component as source. -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks whether this is the first time the component has been attached.Methods inherited from class com.vaadin.flow.component.internal.AbstractAttachDetachEvent
getSession, getUIMethods inherited from class com.vaadin.flow.component.ComponentEvent
getSource, isFromClient, unregisterListenerMethods inherited from class java.util.EventObject
toString
-
Constructor Details
-
AttachEvent
Creates a new attach event with the given component as source.- Parameters:
source- the component that was attachedinitialAttach- indicates whether this is the first time the component (element) has been attached
-
-
Method Details
-
isInitialAttach
public boolean isInitialAttach()Checks whether this is the first time the component has been attached.- Returns:
trueif this it the first time the component has been attached,falseotherwise
-