Package io.jmix.flowui.view.navigation
Class ViewClassNavigator<V extends View<?>>
java.lang.Object
io.jmix.flowui.view.navigation.AbstractViewNavigator
io.jmix.flowui.view.navigation.ViewNavigator
io.jmix.flowui.view.navigation.ViewClassNavigator<V>
- All Implemented Interfaces:
- SupportsAfterViewNavigationHandler<V>
public class ViewClassNavigator<V extends View<?>>
extends ViewNavigator
implements SupportsAfterViewNavigationHandler<V>
Provides a fluent interface to configure navigation parameters and navigate to a 
View.
 
 An instance of this class should be obtained through ViewNavigators.view(Class).
- 
Nested Class SummaryNested classes/interfaces inherited from interface io.jmix.flowui.view.navigation.SupportsAfterViewNavigationHandlerSupportsAfterViewNavigationHandler.AfterViewNavigationEvent<V>
- 
Field SummaryFieldsModifier and TypeFieldDescriptionFields inherited from class io.jmix.flowui.view.navigation.AbstractViewNavigatorbackwardNavigation, handler, origin, queryParameters, routeParameters, viewId
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedViewClassNavigator(ViewNavigator viewNavigator, Class<V> viewClass) ViewClassNavigator(View<?> origin, Consumer<? extends ViewNavigator> handler, Class<V> viewClass) ViewClassNavigator(Consumer<? extends ViewNavigator> handler, Class<V> viewClass) Deprecated, for removal: This API element is subject to removal in a future version.
- 
Method SummaryModifier and TypeMethodDescriptionwithAfterNavigationHandler(Consumer<SupportsAfterViewNavigationHandler.AfterViewNavigationEvent<V>> handler) Adds a handler that will be invoked if navigation to a view actually happened.withBackwardNavigation(boolean backwardNavigation) Sets whether the current URL should be navigated to when the opened view is closed.withQueryParameters(com.vaadin.flow.router.QueryParameters queryParameters) Sets URL query parameters.withRouteParameters(com.vaadin.flow.router.RouteParameters routeParameters) Sets URL route parameters.withViewId(String viewId) Sets the opened view by id.Methods inherited from class io.jmix.flowui.view.navigation.ViewNavigatorwithViewClassMethods inherited from class io.jmix.flowui.view.navigation.AbstractViewNavigatorgetOrigin, getQueryParameters, getRouteParameters, getViewId, isBackwardNavigation, navigate
- 
Field Details- 
viewClass
 
- 
- 
Constructor Details- 
ViewClassNavigator@Deprecated(since="2.3", forRemoval=true) public ViewClassNavigator(Consumer<? extends ViewNavigator> handler, Class<V> viewClass) Deprecated, for removal: This API element is subject to removal in a future version.
- 
ViewClassNavigatorpublic ViewClassNavigator(View<?> origin, Consumer<? extends ViewNavigator> handler, Class<V> viewClass) 
 
- 
- 
Method Details- 
withViewIdDescription copied from class:AbstractViewNavigatorSets the opened view by id.- Overrides:
- withViewIdin class- ViewNavigator
- Parameters:
- viewId- identifier of the view as specified in the- ViewControllerannotation
- Returns:
- this instance for chaining
 
- 
withRouteParameterspublic ViewClassNavigator<V> withRouteParameters(@Nullable com.vaadin.flow.router.RouteParameters routeParameters) Description copied from class:AbstractViewNavigatorSets URL route parameters.- Overrides:
- withRouteParametersin class- ViewNavigator
- Parameters:
- routeParameters- route parameters
- Returns:
- this instance for chaining
 
- 
withQueryParameterspublic ViewClassNavigator<V> withQueryParameters(@Nullable com.vaadin.flow.router.QueryParameters queryParameters) Description copied from class:AbstractViewNavigatorSets URL query parameters.- Overrides:
- withQueryParametersin class- ViewNavigator
- Parameters:
- queryParameters- query parameters
- Returns:
- this instance for chaining
 
- 
getViewClass- Overrides:
- getViewClassin class- AbstractViewNavigator
- Returns:
- opened view class
 
 
-