Package com.vaadin.flow.router.internal
Class NavigationStateRenderer
- java.lang.Object
-
- com.vaadin.flow.router.internal.AbstractNavigationStateRenderer
-
- com.vaadin.flow.router.internal.NavigationStateRenderer
-
- All Implemented Interfaces:
NavigationHandler
,Serializable
public class NavigationStateRenderer extends AbstractNavigationStateRenderer
Handles navigation events by rendering a contained NavigationState in the target UI.For internal use only. May be renamed or removed in a future release.
- Since:
- 1.0
- See Also:
NavigationState
,Route
, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description NavigationStateRenderer(NavigationState navigationState)
Constructs a new NavigationStateRenderer that handles the given navigation state.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected List<Class<? extends RouterLayout>>
getRouterLayoutTypes(Class<? extends Component> targetType, Router router)
Gets the router layout types to show for the given route target type, starting from the parent layout immediately wrapping the route target type.protected void
notifyNavigationTarget(Component componentInstance, NavigationEvent navigationEvent, BeforeEnterEvent beforeEnterEvent, LocationChangeEvent locationChangeEvent)
Notify the navigation target about the status of the navigation.-
Methods inherited from class com.vaadin.flow.router.internal.AbstractNavigationStateRenderer
getNavigationState, handle, handleTriggeredBeforeEvent, purgeInactiveUIPreservedChainCache, pushHistoryState, shouldPushHistoryState
-
-
-
-
Constructor Detail
-
NavigationStateRenderer
public NavigationStateRenderer(NavigationState navigationState)
Constructs a new NavigationStateRenderer that handles the given navigation state.- Parameters:
navigationState
- the navigation state handled by this instance
-
-
Method Detail
-
getRouterLayoutTypes
protected List<Class<? extends RouterLayout>> getRouterLayoutTypes(Class<? extends Component> targetType, Router router)
Description copied from class:AbstractNavigationStateRenderer
Gets the router layout types to show for the given route target type, starting from the parent layout immediately wrapping the route target type.- Specified by:
getRouterLayoutTypes
in classAbstractNavigationStateRenderer
- Parameters:
targetType
- component type that will be shownrouter
- used router instance- Returns:
- a list of parent
RouterLayout
types, notnull
-
notifyNavigationTarget
protected void notifyNavigationTarget(Component componentInstance, NavigationEvent navigationEvent, BeforeEnterEvent beforeEnterEvent, LocationChangeEvent locationChangeEvent)
Description copied from class:AbstractNavigationStateRenderer
Notify the navigation target about the status of the navigation.- Specified by:
notifyNavigationTarget
in classAbstractNavigationStateRenderer
- Parameters:
componentInstance
- the navigation target instancenavigationEvent
- the low level navigation event that is being processedbeforeEnterEvent
- the before enter event that will be fired unless navigation is reroutedlocationChangeEvent
- the location change event that will be fired unless navigation is rerouted
-
-