Package io.jmix.flowui.view.navigation
Class ViewNavigator
java.lang.Object
io.jmix.flowui.view.navigation.AbstractViewNavigator
io.jmix.flowui.view.navigation.ViewNavigator
- Direct Known Subclasses:
ViewClassNavigator
Provides a fluent interface to configure navigation parameters and navigate to a
View.
An instance of this class should be obtained through ViewNavigators.view(String).
-
Field Summary
Fields inherited from class io.jmix.flowui.view.navigation.AbstractViewNavigator
backwardNavigation, handler, queryParameters, routeParameters, viewId -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedViewNavigator(ViewNavigator viewNavigator) ViewNavigator(Consumer<? extends ViewNavigator> handler) -
Method Summary
Modifier and TypeMethodDescriptionwithBackwardNavigation(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.<V extends View<?>>
ViewClassNavigator<V>withViewClass(Class<V> viewClass) Sets the opened view by its class.withViewId(String viewId) Sets the opened view by id.Methods inherited from class io.jmix.flowui.view.navigation.AbstractViewNavigator
getQueryParameters, getRouteParameters, getViewClass, getViewId, isBackwardNavigation, navigate
-
Constructor Details
-
ViewNavigator
-
-
Method Details
-
withViewId
Description copied from class:AbstractViewNavigatorSets the opened view by id.- Overrides:
withViewIdin classAbstractViewNavigator- Parameters:
viewId- identifier of the view as specified in theViewControllerannotation- Returns:
- this instance for chaining
-
withViewClass
Sets the opened view by its class.- Parameters:
viewClass- view class- Returns:
- this instance for chaining
-
withRouteParameters
public ViewNavigator withRouteParameters(@Nullable com.vaadin.flow.router.RouteParameters routeParameters) Description copied from class:AbstractViewNavigatorSets URL route parameters.- Overrides:
withRouteParametersin classAbstractViewNavigator- Parameters:
routeParameters- route parameters- Returns:
- this instance for chaining
-
withQueryParameters
public ViewNavigator withQueryParameters(@Nullable com.vaadin.flow.router.QueryParameters queryParameters) Description copied from class:AbstractViewNavigatorSets URL query parameters.- Overrides:
withQueryParametersin classAbstractViewNavigator- Parameters:
queryParameters- query parameters- Returns:
- this instance for chaining
-