We use cookies to serve our customers and website visitors in the best possible way. Cookies are used for the proper functioning of the website and for improving the user experience, monitoring visitor traffic and marketing purposes. By continuing to browse the site, you agree to our use of cookies. You can read more about cookies here.
com.vaadin.navigator.
Class ViewBeforeLeaveEvent
- java.lang.Object
-
- java.util.EventObject
-
- com.vaadin.navigator.ViewBeforeLeaveEvent
-
All Implemented Interfaces:
public class ViewBeforeLeaveEvent extends EventObject
Event sent to the View instance before navigating away from it.
Provides a
navigate()
method which must be called for the navigation to take place.Since:
8.1
See Also:
-
-
Field Summary
-
Fields inherited from class java.util.EventObject
source
-
-
Constructor Summary
Constructors Constructor Description ViewBeforeLeaveEvent​(Navigator navigator, ViewLeaveAction action)
Creates a new event instance for the given navigator.
-
Method Summary
All Methods Modifier and Type Method Description protected boolean
isNavigateRun()
Checks if the navigate command has been executed.
void
navigate()
Performs the navigation which triggered the event in the first place.
-
Methods inherited from class java.util.EventObject
getSource, toString
-
-
-
-
Constructor Detail
-
ViewBeforeLeaveEvent
public ViewBeforeLeaveEvent​(Navigator navigator, ViewLeaveAction action)
Creates a new event instance for the given navigator.
Parameters:
navigator
- the navigator instanceaction
- the command to execute when callingnavigate()
-
-
Method Detail
-
navigate
public void navigate()
Performs the navigation which triggered the event in the first place.
-
isNavigateRun
protected boolean isNavigateRun()
Checks if the navigate command has been executed.
Returns:
true
ifnavigate()
has been called,false
otherwise
-
-