public class BeforeLeaveEvent extends BeforeEvent
| Modifier and Type | Class and Description |
|---|---|
class |
BeforeLeaveEvent.ContinueNavigationAction
The action to resume a postponed
BeforeEnterEvent. |
source| Constructor and Description |
|---|
BeforeLeaveEvent(NavigationEvent event,
Class<?> navigationTarget)
Construct event from a NavigationEvent.
|
BeforeLeaveEvent(Router router,
NavigationTrigger trigger,
Location location,
Class<?> navigationTarget,
UI ui)
Constructs a new BeforeNavigation Event.
|
| Modifier and Type | Method and Description |
|---|---|
BeforeLeaveEvent.ContinueNavigationAction |
getContinueNavigationAction()
Gets the action used to resume this event, if it was postponed.
|
boolean |
isPostponed()
Checks whether this event was postponed.
|
BeforeLeaveEvent.ContinueNavigationAction |
postpone()
Initiates the postponement of the current navigation transition, allowing
a listener to e.g.
|
getErrorParameter, getLocation, getNavigationTarget, getRerouteTarget, getRouteTargetType, getSource, getTrigger, getUI, hasErrorParameter, hasRerouteTarget, rerouteTo, rerouteTo, rerouteTo, rerouteTo, rerouteTo, rerouteTo, rerouteToError, rerouteToError, rerouteToErrortoStringpublic BeforeLeaveEvent(NavigationEvent event, Class<?> navigationTarget)
event - NavigationEvent that is on goingnavigationTarget - Navigation targetpublic BeforeLeaveEvent(Router router, NavigationTrigger trigger, Location location, Class<?> navigationTarget, UI ui)
router - the router that triggered the change, not nulltrigger - the type of user action that triggered this location change,
not nulllocation - the new location, not nullnavigationTarget - navigation target classui - the UI related to the navigationpublic BeforeLeaveEvent.ContinueNavigationAction postpone()
This is only valid while leaving (deactivating) a page; if the method is
called while entering / activating the new page, it will throw an
IllegalStateException.
public boolean isPostponed()
public BeforeLeaveEvent.ContinueNavigationAction getContinueNavigationAction()
Copyright © 2000–2018 Vaadin Ltd. All rights reserved.