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(View, String).
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected final Consumer<? extends AbstractViewNavigator> protected final View<?> protected com.vaadin.flow.router.QueryParametersprotected com.vaadin.flow.router.RouteParametersprotected String -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractViewNavigator(AbstractViewNavigator viewNavigator) protectedAbstractViewNavigator(View<?> origin, Consumer<? extends AbstractViewNavigator> handler) -
Method Summary
Modifier and TypeMethodDescriptionView<?> Optional<com.vaadin.flow.router.QueryParameters> Optional<com.vaadin.flow.router.RouteParameters> booleanvoidnavigate()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(@Nullable com.vaadin.flow.router.QueryParameters queryParameters) Sets URL query parameters.withRouteParameters(@Nullable com.vaadin.flow.router.RouteParameters routeParameters) Sets URL route parameters.withViewId(@Nullable 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
-
-
Method Details
-
getOrigin
- Returns:
- invoking view
-
withViewId
Sets the opened view by id.- Parameters:
viewId- identifier of the view as specified in theViewControllerannotation- 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
ViewControllerannotation
-
getViewClass
- Returns:
- opened view class
-
getRouteParameters
- Returns:
- URL route parameters
-
getQueryParameters
- Returns:
- URL query parameters
-