Class UnloadEvent
- java.lang.Object
-
- java.util.EventObject
-
- com.vaadin.flow.component.ComponentEvent<UnloadObserver>
-
- org.vaadin.miki.superfields.unload.UnloadEvent
-
- All Implemented Interfaces:
Serializable
public class UnloadEvent extends com.vaadin.flow.component.ComponentEvent<UnloadObserver>
Server-side event class associated withbeforeunloadevent happening in the client-side. Can optionally prompt the user before leaving the page.- Since:
- 2020-04-29
- Author:
- miki
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class java.util.EventObject
source
-
-
Constructor Summary
Constructors Constructor Description UnloadEvent(UnloadObserver source, boolean attempted)Creates a new event using the given source and indicator whether the event originated from the client side or the server side.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisBecauseOfQuerying()Checks whether or not the event has been fired in response to querying the user onbeforeunloadbrowser event.-
Methods inherited from class com.vaadin.flow.component.ComponentEvent
getSource, isFromClient, unregisterListener
-
Methods inherited from class java.util.EventObject
toString
-
-
-
-
Constructor Detail
-
UnloadEvent
public UnloadEvent(UnloadObserver source, boolean attempted)
Creates a new event using the given source and indicator whether the event originated from the client side or the server side.- Parameters:
source- the source componentattempted- whentrue, the event is fired in response to querying before unloading;falseotherwise.
-
-