Package io.jmix.flowui.view.navigation
Class AbstractViewNavigator
java.lang.Object
io.jmix.flowui.view.navigation.AbstractViewNavigator
- Direct Known Subclasses:
DetailViewNavigator
,ListViewNavigator
,ViewNavigator
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
Modifier and TypeFieldDescriptionprotected boolean
protected final Consumer<? extends AbstractViewNavigator>
protected com.vaadin.flow.router.QueryParameters
protected com.vaadin.flow.router.RouteParameters
protected String
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractViewNavigator
(AbstractViewNavigator viewNavigator) protected
AbstractViewNavigator
(Consumer<? extends AbstractViewNavigator> handler) -
Method Summary
Modifier and TypeMethodDescriptionOptional<com.vaadin.flow.router.QueryParameters>
Optional<com.vaadin.flow.router.RouteParameters>
boolean
void
navigate()
Perform navigation to the view configured usingwithViewId(String)
.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.
-
Field Details
-
handler
-
viewId
-
routeParameters
protected com.vaadin.flow.router.RouteParameters routeParameters -
queryParameters
protected com.vaadin.flow.router.QueryParameters queryParameters
-
-
Constructor Details
-
AbstractViewNavigator
-
-
Method Details
-
withViewId
Sets the opened view by id.- Parameters:
viewId
- identifier of the view as specified in theViewController
annotation- Returns:
- this instance for chaining
-
withRouteParameters
public AbstractViewNavigator withRouteParameters(@Nullable com.vaadin.flow.router.RouteParameters routeParameters) Sets URL route parameters.- Parameters:
routeParameters
- route parameters- Returns:
- this instance for chaining
-
withQueryParameters
public AbstractViewNavigator withQueryParameters(@Nullable com.vaadin.flow.router.QueryParameters queryParameters) Sets URL query parameters.- Parameters:
queryParameters
- query parameters- Returns:
- this instance for chaining
-
getViewId
- Returns:
- identifier of the opened view as specified in the
ViewController
annotation
-
getViewClass
- Returns:
- opened view class
-
getRouteParameters
- Returns:
- URL route parameters
-
getQueryParameters
- Returns:
- URL query parameters
-