Package com.vaadin.flow.router.internal
Class AbstractNavigationStateRenderer
java.lang.Object
com.vaadin.flow.router.internal.AbstractNavigationStateRenderer
- All Implemented Interfaces:
NavigationHandler
,Serializable
- Direct Known Subclasses:
ErrorStateRenderer
,NavigationStateRenderer
Base class for navigation handlers that target a navigation state.
For internal use only. May be renamed or removed in a future release.
- Since:
- 1.0
- Author:
- Vaadin Ltd
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractNavigationStateRenderer
(NavigationState navigationState) Creates a new renderer for the given navigation state. -
Method Summary
Modifier and TypeMethodDescriptionGets the targeted navigation state.protected abstract List<Class<? extends RouterLayout>>
getRouterLayoutTypes
(Class<? extends Component> routeTargetType, 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 List<Class<? extends RouterLayout>>
getTargetParentLayouts
(RouteTarget routeTarget, RouteRegistry registry, String path) Get the parentLayouts for given routeTarget or use an applicable@Layout
when no parentLayouts defined and target is a Route annotated target with autoLayout enabled and no layout set.int
handle
(NavigationEvent event) Handles the navigation event.handleTriggeredBeforeEvent
(NavigationEvent event, BeforeEvent beforeEvent) Handle aBeforeEvent
after if has been triggered to an observer.protected abstract void
notifyNavigationTarget
(Component componentInstance, NavigationEvent navigationEvent, BeforeEnterEvent beforeEnterEvent, LocationChangeEvent locationChangeEvent) Notify the navigation target about the status of the navigation.static void
purgeInactiveUIPreservedChainCache
(UI inactiveUI) Removes preserved component cache for an inactive UI.protected void
pushHistoryState
(NavigationEvent event) protected boolean
-
Constructor Details
-
Method Details
-
getTargetParentLayouts
protected List<Class<? extends RouterLayout>> getTargetParentLayouts(RouteTarget routeTarget, RouteRegistry registry, String path) Get the parentLayouts for given routeTarget or use an applicable@Layout
when no parentLayouts defined and target is a Route annotated target with autoLayout enabled and no layout set.- Parameters:
routeTarget
- RouteTarget to get parents forregistry
- Registry in usepath
- request path- Returns:
- List of parent layouts
-
getRouterLayoutTypes
protected abstract List<Class<? extends RouterLayout>> getRouterLayoutTypes(Class<? extends Component> routeTargetType, 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.- Parameters:
routeTargetType
- component type that will be shownrouter
- used router instance- Returns:
- a list of parent
RouterLayout
types, notnull
-
purgeInactiveUIPreservedChainCache
Removes preserved component cache for an inactive UI.- Parameters:
inactiveUI
- the inactive UI- Throws:
IllegalStateException
- if the UI is not in closing state