Class UnloadEvent
java.lang.Object
java.util.EventObject
com.vaadin.flow.component.ComponentEvent<UnloadObserver>
org.vaadin.miki.superfields.unload.UnloadEvent
- All Implemented Interfaces:
Serializable
Server-side event class associated with
beforeunload event happening in the client-side.
Can optionally prompt the user before leaving the page.- Since:
- 2020-04-29
- Author:
- miki
- See Also:
-
Field Summary
Fields inherited from class java.util.EventObject
source -
Constructor Summary
ConstructorsConstructorDescriptionUnloadEvent(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
Modifier and TypeMethodDescriptionbooleanChecks 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, unregisterListenerMethods inherited from class java.util.EventObject
toString
-
Constructor Details
-
UnloadEvent
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.
-
-
Method Details
-
isBecauseOfQuerying
public boolean isBecauseOfQuerying()Checks whether or not the event has been fired in response to querying the user onbeforeunloadbrowser event.- Returns:
truewhen event is in response to querying the user onbeforeunload,falseotherwise.
-