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 final View<?>
protected com.vaadin.flow.router.QueryParameters
protected com.vaadin.flow.router.RouteParameters
protected String
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractViewNavigator
(AbstractViewNavigator viewNavigator) protected
AbstractViewNavigator
(View<?> origin, Consumer<? extends AbstractViewNavigator> handler) protected
AbstractViewNavigator
(Consumer<? extends AbstractViewNavigator> handler) Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionView<?>
Optional<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
-
origin
-
handler
-
viewId
-
routeParameters
protected com.vaadin.flow.router.RouteParameters routeParameters -
queryParameters
protected com.vaadin.flow.router.QueryParameters queryParameters
-
-
Constructor Details
-
AbstractViewNavigator
@Deprecated(since="2.3", forRemoval=true) protected AbstractViewNavigator(Consumer<? extends AbstractViewNavigator> handler) Deprecated, for removal: This API element is subject to removal in a future version. -
AbstractViewNavigator
-
-
Method Details
-
getOrigin
- Returns:
- invoking view
-
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
-