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)
Deprecated.
Use
BeforeLeaveEvent(NavigationEvent, Class, List)
instead. |
BeforeLeaveEvent(NavigationEvent event,
Class<?> navigationTarget,
List<Class<? extends RouterLayout>> layouts)
Construct event from a NavigationEvent.
|
BeforeLeaveEvent(Router router,
NavigationTrigger trigger,
Location location,
Class<?> navigationTarget,
UI ui)
Deprecated.
|
BeforeLeaveEvent(Router router,
NavigationTrigger trigger,
Location location,
Class<?> navigationTarget,
UI ui,
List<Class<? extends RouterLayout>> layouts)
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.
|
forwardTo, forwardTo, forwardTo, forwardTo, forwardTo, forwardTo, getErrorParameter, getForwardTarget, getForwardTargetParameters, getForwardTargetType, getLayouts, getLocation, getNavigationTarget, getRerouteTarget, getRerouteTargetParameters, getRerouteTargetType, getRouteTargetType, getSource, getTrigger, getUI, hasErrorParameter, hasForwardTarget, hasRerouteTarget, rerouteTo, rerouteTo, rerouteTo, rerouteTo, rerouteTo, rerouteTo, rerouteToError, rerouteToError, rerouteToError
toString
@Deprecated public BeforeLeaveEvent(NavigationEvent event, Class<?> navigationTarget)
BeforeLeaveEvent(NavigationEvent, Class, List)
instead.event
- NavigationEvent that is on-goingnavigationTarget
- Navigation targetpublic BeforeLeaveEvent(NavigationEvent event, Class<?> navigationTarget, List<Class<? extends RouterLayout>> layouts)
event
- NavigationEvent that is on-goingnavigationTarget
- Navigation targetlayouts
- Navigation layout chain@Deprecated public BeforeLeaveEvent(Router router, NavigationTrigger trigger, Location location, Class<?> navigationTarget, UI ui)
BeforeLeaveEvent(Router, NavigationTrigger, Location, Class, UI, List)
instead.router
- the router that triggered the change, not null
trigger
- the type of user action that triggered this location change,
not null
location
- the new location, not null
navigationTarget
- navigation target classui
- the UI related to the navigationpublic BeforeLeaveEvent(Router router, NavigationTrigger trigger, Location location, Class<?> navigationTarget, UI ui, List<Class<? extends RouterLayout>> layouts)
router
- the router that triggered the change, not null
trigger
- the type of user action that triggered this location change,
not null
location
- the new location, not null
navigationTarget
- navigation target classui
- the UI related to the navigationlayouts
- the layout chain for the navigation targetpublic 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 © 2020. All rights reserved.