com.vaadin.flow.router.internal.
Class ErrorStateRenderer
- java.lang.Object
-
- com.vaadin.flow.router.internal.AbstractNavigationStateRenderer
-
- com.vaadin.flow.router.internal.ErrorStateRenderer
-
All Implemented Interfaces:
public class ErrorStateRenderer extends AbstractNavigationStateRenderer
Handles error navigation rendering in the target UI.
For internal use only. May be renamed or removed in a future release.
Since:
1.0
See Also:
-
-
Constructor Summary
Constructors Constructor and Description ErrorStateRenderer(NavigationState navigationState)
Constructs a new state renderer for the given navigation state.
-
Method Summary
All Methods Modifier and Type Method and Description protected boolean
eventActionsSupported()
Checks whether this renderer should reroute or postpone navigation based on results from event listeners.
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.
int
handle(NavigationEvent event)
Handles the navigation event.
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, purgeInactiveUIPreservedChainCache
-
-
-
-
Constructor Detail
-
ErrorStateRenderer
public ErrorStateRenderer(NavigationState navigationState)
Constructs a new state renderer for the given navigation state.
Parameters:
navigationState
- the navigation state handled by this instance
-
-
Method Detail
-
handle
public int handle(NavigationEvent event)
Description copied from interface:
NavigationHandler
Handles the navigation event.
Specified by:
handle
in interfaceNavigationHandler
Overrides:
handle
in classAbstractNavigationStateRenderer
Parameters:
event
- the navigation event to handleReturns:
the HTTP status code to return to the client if handling an initial rendering request
-
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
-
getRouterLayoutTypes
public 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.
Specified by:
getRouterLayoutTypes
in classAbstractNavigationStateRenderer
Parameters:
targetType
- component type to showrouter
- used router instanceReturns:
a list of parent
RouterLayout
types, notnull
-
eventActionsSupported
protected boolean eventActionsSupported()
Description copied from class:
AbstractNavigationStateRenderer
Checks whether this renderer should reroute or postpone navigation based on results from event listeners. Furthermore, the before leave event is not fired at all if event actions are not supported.
Specified by:
eventActionsSupported
in classAbstractNavigationStateRenderer
Returns:
true
to support event actions;false
otherwise.
-
-