Package io.jmix.flowui.view.navigation
Class ReadViewClassNavigator<E,V extends View<?>>
java.lang.Object
io.jmix.flowui.view.navigation.AbstractViewNavigator
io.jmix.flowui.view.navigation.ReadViewNavigator<E>
io.jmix.flowui.view.navigation.ReadViewClassNavigator<E,V>
- Type Parameters:
E- the type of the entity shown by the viewV- the type of the view being navigated to
- All Implemented Interfaces:
SupportsAfterViewNavigationHandler<V>
@NullMarked
public class ReadViewClassNavigator<E,V extends View<?>>
extends ReadViewNavigator<E>
implements SupportsAfterViewNavigationHandler<V>
Facilitates navigation to a read view of a specific type with additional configuration options.
This class extends
ReadViewNavigator to provide the ability to specify a particular view class
and to handle a callback after successful navigation to a view.-
Nested Class Summary
Nested classes/interfaces inherited from interface io.jmix.flowui.view.navigation.SupportsAfterViewNavigationHandler
SupportsAfterViewNavigationHandler.AfterViewNavigationEvent<V> -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected @Nullable Consumer<SupportsAfterViewNavigationHandler.AfterViewNavigationEvent<V>> Fields inherited from class io.jmix.flowui.view.navigation.ReadViewNavigator
entity, entityClassFields inherited from class io.jmix.flowui.view.navigation.AbstractViewNavigator
backwardNavigation, handler, origin, queryParameters, routeParameters, viewId -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedReadViewClassNavigator(ReadViewNavigator<E> viewNavigator, Class<V> viewClass) ReadViewClassNavigator(View<?> origin, Class<E> entityClass, Consumer<? extends ReadViewNavigator<E>> handler, Class<V> viewClass) -
Method Summary
Modifier and TypeMethodDescriptionreadEntity(E entity) Sets the entity instance to show.withAfterNavigationHandler(Consumer<SupportsAfterViewNavigationHandler.AfterViewNavigationEvent<V>> handler) Adds a handler that will be invoked if navigation to a view actually happened.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.Methods inherited from class io.jmix.flowui.view.navigation.ReadViewNavigator
getEntity, getEntityClass, withViewClassMethods inherited from class io.jmix.flowui.view.navigation.AbstractViewNavigator
getOrigin, getQueryParameters, getRouteParameters, getViewId, isBackwardNavigation, navigate
-
Field Details
-
viewClass
-
-
Constructor Details
-
ReadViewClassNavigator
-
-
Method Details
-
readEntity
Description copied from class:ReadViewNavigatorSets the entity instance to show.- Overrides:
readEntityin classReadViewNavigator<E>- Parameters:
entity- entity instance to show- Returns:
- this instance for chaining
-
withViewId
Description copied from class:AbstractViewNavigatorSets the opened view by id.- Overrides:
withViewIdin classReadViewNavigator<E>- Parameters:
viewId- identifier of the view as specified in theViewControllerannotation- Returns:
- this instance for chaining
-
withRouteParameters
public ReadViewClassNavigator<E,V> withRouteParameters(@Nullable com.vaadin.flow.router.RouteParameters routeParameters) Description copied from class:AbstractViewNavigatorSets URL route parameters.- Overrides:
withRouteParametersin classReadViewNavigator<E>- Parameters:
routeParameters- route parameters- Returns:
- this instance for chaining
-
withQueryParameters
public ReadViewClassNavigator<E,V> withQueryParameters(@Nullable com.vaadin.flow.router.QueryParameters queryParameters) Description copied from class:AbstractViewNavigatorSets URL query parameters.- Overrides:
withQueryParametersin classReadViewNavigator<E>- Parameters:
queryParameters- query parameters- Returns:
- this instance for chaining
-
getViewClass
- Overrides:
getViewClassin classAbstractViewNavigator- Returns:
- opened view class
-