Package io.jmix.flowui.action
Interface ViewOpeningAction
- All Superinterfaces:
- Action,- HasShortcutCombination
- All Known Implementing Classes:
- AddAction,- CreateAction,- EditAction,- EntityInspectorAddAction,- EntityInspectorCreateAction,- EntityInspectorEditAction,- EntityInspectorLookupAction,- EntityLookupAction,- EntityOpenAction,- EntityOpenCompositionAction,- LogicalFilterEditAction,- MultiValueSelectAction,- ReadAction
Interface to be implemented by actions that open a view.
- 
Nested Class SummaryNested ClassesModifier and TypeInterfaceDescriptionstatic interfacestatic interface
- 
Field SummaryFields inherited from interface io.jmix.flowui.kit.action.ActionPROP_DESCRIPTION, PROP_ENABLED, PROP_ICON, PROP_SHORTCUT_COMBINATION, PROP_TEXT, PROP_VARIANT, PROP_VISIBLE
- 
Method SummaryModifier and TypeMethodDescription<V extends View<?>>
 Consumer<DialogWindow.AfterCloseEvent<V>>Returns the view open mode if it was set bysetOpenMode(OpenMode)or in the view XML, otherwise returnsnull.Returns the view class if it was set bysetViewClass(Class)or in the view XML, otherwise returnsnull.Returns the view id if it was set bysetViewId(String)or in the view XML, otherwise returnsnull.<V extends View<?>>
 voidsetAfterCloseHandler(Consumer<DialogWindow.AfterCloseEvent<V>> afterCloseHandler) Sets the handler to be invoked when the detail view closes.voidsetOpenMode(OpenMode openMode) Sets the view open mode.voidsetQueryParametersProvider(ViewOpeningAction.QueryParametersProvider queryParameters) Sets query parameters provider that returns query parameters that should be used in the URL.voidsetRouteParametersProvider(ViewOpeningAction.RouteParametersProvider routeParameters) Sets route parameters provider that returns route parameters that should be used in the route template.voidsetViewClass(Class<? extends View> viewClass) Sets the view class.<V extends View<?>>
 voidsetViewConfigurer(Consumer<V> viewConfigurer) Sets the view configurer.voidSets the view id.Methods inherited from interface io.jmix.flowui.kit.action.ActionactionPerform, addPropertyChangeListener, getDescription, getIcon, getId, getText, getVariant, isEnabled, isVisible, refreshState, setDescription, setEnabled, setIcon, setText, setVariant, setVisibleMethods inherited from interface io.jmix.flowui.kit.component.HasShortcutCombinationgetShortcutCombination, setShortcutCombination
- 
Method Details- 
getOpenModeReturns the view open mode if it was set bysetOpenMode(OpenMode)or in the view XML, otherwise returnsnull.
- 
setOpenModeSets the view open mode.- Parameters:
- openMode- the open mode to set
 
- 
getViewIdReturns the view id if it was set bysetViewId(String)or in the view XML, otherwise returnsnull.
- 
setViewIdSets the view id.- Parameters:
- viewId- the view id to set
 
- 
getViewClassReturns the view class if it was set bysetViewClass(Class)or in the view XML, otherwise returnsnull.
- 
setViewClassSets the view class.- Parameters:
- viewClass- the view class to set
 
- 
getRouteParametersProvider- Returns:
- route parameters or nullif not set
 
- 
setRouteParametersProvidervoid setRouteParametersProvider(@Nullable ViewOpeningAction.RouteParametersProvider routeParameters) Sets route parameters provider that returns route parameters that should be used in the route template.Note that route parameters provider is set if the detail is opened in OpenMode.NAVIGATION.- Parameters:
- routeParameters- route parameters provider to set
- See Also:
- 
- Route
 
 
- 
getQueryParametersProvider- Returns:
- query parameters provider or nullif not set
 
- 
setQueryParametersProvidervoid setQueryParametersProvider(@Nullable ViewOpeningAction.QueryParametersProvider queryParameters) Sets query parameters provider that returns query parameters that should be used in the URL.Note that query parameters provider is set if the detail is opened in OpenMode.NAVIGATION.- Parameters:
- queryParameters- query parameters provider to set
 
- 
setAfterCloseHandler<V extends View<?>> void setAfterCloseHandler(@Nullable Consumer<DialogWindow.AfterCloseEvent<V>> afterCloseHandler) Sets the handler to be invoked when the detail view closes.Note that handler is invoked if the detail is opened in OpenMode.DIALOGmode.The preferred way to set the handler is using a controller method annotated with Install, e.g.:@Install(to = "petsTable.view", subject = "afterCloseHandler") protected void petsTableViewAfterCloseHandler(AfterCloseEvent event) { if (event.closedWith(StandardOutcome.SAVE)) { System.out.println("Saved"); } }- Type Parameters:
- V- view type
- Parameters:
- afterCloseHandler- handler to set
 
- 
getAfterCloseHandler
- 
setViewConfigurerSets the view configurer. Use the configurer if you need to provide parameters to the opened view through setters.The preferred way to set the configurer is using a controller method annotated with Install, e.g.:@Install(to = "petsTable.view", subject = "viewConfigurer") protected void petsTableViewConfigurer(View<?> view) { view.setSomeParameter(someValue); }
- 
getViewConfigurer
 
-