Package io.jmix.flowui.view.navigation
Class DetailViewNavigator<E>
java.lang.Object
io.jmix.flowui.view.navigation.AbstractViewNavigator
io.jmix.flowui.view.navigation.DetailViewNavigator<E>
- Direct Known Subclasses:
DetailViewClassNavigator
Provides a fluent interface to configure navigation parameters and navigate to an entity detail
View
.
An instance of this class should be obtained through ViewNavigators.detailView(Class)
and its overloaded
variants.
-
Field Summary
Fields inherited from class io.jmix.flowui.view.navigation.AbstractViewNavigator
backwardNavigation, handler, origin, queryParameters, routeParameters, viewId
-
Constructor Summary
ModifierConstructorDescriptionprotected
DetailViewNavigator
(DetailViewNavigator<E> viewNavigator) DetailViewNavigator
(View<?> origin, Class<E> entityClass, Consumer<? extends DetailViewNavigator<E>> handler) DetailViewNavigator
(Class<E> entityClass, Consumer<? extends DetailViewNavigator<E>> handler) Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptioneditEntity
(E entity) getMode()
boolean
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.withReadOnly
(boolean readOnly) withRouteParameters
(com.vaadin.flow.router.RouteParameters routeParameters) Sets URL route parameters.<V extends View<?>>
DetailViewClassNavigator<E,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
getOrigin, getQueryParameters, getRouteParameters, getViewClass, getViewId, isBackwardNavigation, navigate
-
Field Details
-
entityClass
-
editedEntity
-
readOnly
protected boolean readOnly -
mode
-
-
Constructor Details
-
DetailViewNavigator
@Deprecated(since="2.3", forRemoval=true) public DetailViewNavigator(Class<E> entityClass, Consumer<? extends DetailViewNavigator<E>> handler) Deprecated, for removal: This API element is subject to removal in a future version. -
DetailViewNavigator
-
-
Method Details
-
newEntity
-
editEntity
-
withViewId
Description copied from class:AbstractViewNavigator
Sets the opened view by id.- Overrides:
withViewId
in classAbstractViewNavigator
- Parameters:
viewId
- identifier of the view as specified in theViewController
annotation- Returns:
- this instance for chaining
-
withViewClass
Sets the opened view by its class.- Parameters:
viewClass
- view class- Returns:
- this instance for chaining
-
withRouteParameters
public DetailViewNavigator<E> withRouteParameters(@Nullable com.vaadin.flow.router.RouteParameters routeParameters) Description copied from class:AbstractViewNavigator
Sets URL route parameters.- Overrides:
withRouteParameters
in classAbstractViewNavigator
- Parameters:
routeParameters
- route parameters- Returns:
- this instance for chaining
-
withQueryParameters
public DetailViewNavigator<E> withQueryParameters(@Nullable com.vaadin.flow.router.QueryParameters queryParameters) Description copied from class:AbstractViewNavigator
Sets URL query parameters.- Overrides:
withQueryParameters
in classAbstractViewNavigator
- Parameters:
queryParameters
- query parameters- Returns:
- this instance for chaining
-
withReadOnly
-
getEntityClass
- Returns:
- entity class of the detail view
-
getEditedEntity
- Returns:
- entity instance shown by the detail view
-
getMode
- Returns:
- the detail view purpose (create or edit an entity)
-
isReadOnly
public boolean isReadOnly()- Returns:
- whether a view should be opened in read-only mode
-