Package io.jmix.flowui.action
Interface ScreenOpeningAction
- All Superinterfaces:
Action
- All Known Implementing Classes:
CreateAction
,EditAction
,EntityLookupAction
,EntityOpenAction
,EntityOpenCompositionAction
Interface to be implemented by actions that open a screen.
-
Field Summary
Fields inherited from interface io.jmix.flowui.kit.action.Action
PROP_DESCRIPTION, PROP_ENABLED, PROP_ICON, PROP_SHORTCUT, PROP_TEXT, PROP_VARIANT, PROP_VISIBLE
-
Method Summary
Modifier and TypeMethodDescriptionReturns the screen open mode if it was set bysetOpenMode(OpenMode)
or in the screen XML, otherwise returnsnull
.com.vaadin.flow.router.QueryParameters
com.vaadin.flow.router.RouteParameters
Returns the screen class if it was set bysetScreenClass(Class)
or in the screen XML, otherwise returnsnull
.Returns the screen id if it was set bysetScreenId(String)
or in the screen XML, otherwise returnsnull
.<S extends Screen<?>>
voidsetAfterCloseHandler
(Consumer<DialogWindow.AfterCloseEvent<S>> afterCloseHandler) Sets the handler to be invoked when the editor screen closes.void
setOpenMode
(OpenMode openMode) Sets the screen open mode.void
setQueryParameters
(com.vaadin.flow.router.QueryParameters queryParameters) Sets query parameters that should be used in the URL.void
setRouteParameters
(com.vaadin.flow.router.RouteParameters routeParameters) Sets route parameters that should be used in the route template.void
setScreenClass
(Class<? extends Screen> screenClass) Sets the screen class.void
setScreenId
(String screenId) Sets the screen id.Methods inherited from interface io.jmix.flowui.kit.action.Action
actionPerform, addPropertyChangeListener, getDescription, getIcon, getId, getShortcutCombination, getText, getVariant, isEnabled, isVisible, refreshState, setDescription, setEnabled, setIcon, setShortcutCombination, setText, setVariant, setVisible
-
Method Details
-
getOpenMode
Returns the screen open mode if it was set bysetOpenMode(OpenMode)
or in the screen XML, otherwise returnsnull
. -
setOpenMode
Sets the screen open mode.- Parameters:
openMode
- the open mode to set
-
getScreenId
Returns the screen id if it was set bysetScreenId(String)
or in the screen XML, otherwise returnsnull
. -
setScreenId
Sets the screen id.- Parameters:
screenId
- the screen id to set
-
getScreenClass
Returns the screen class if it was set bysetScreenClass(Class)
or in the screen XML, otherwise returnsnull
. -
setScreenClass
Sets the screen class.- Parameters:
screenClass
- the screen class to set
-
getRouteParameters
@Nullable com.vaadin.flow.router.RouteParameters getRouteParameters()- Returns:
- route parameters or
null
if not set
-
setRouteParameters
void setRouteParameters(@Nullable com.vaadin.flow.router.RouteParameters routeParameters) Sets route parameters that should be used in the route template.Note that route parameters are set if the editor is opened in
OpenMode.NAVIGATION
.- Parameters:
routeParameters
- route parameters to set- See Also:
-
Route
-
getQueryParameters
@Nullable com.vaadin.flow.router.QueryParameters getQueryParameters()- Returns:
- query parameters or
null
if not set
-
setQueryParameters
void setQueryParameters(@Nullable com.vaadin.flow.router.QueryParameters queryParameters) Sets query parameters that should be used in the URL.Note that query parameters are set if the editor is opened in
OpenMode.NAVIGATION
.- Parameters:
queryParameters
- query parameters to set
-
setAfterCloseHandler
<S extends Screen<?>> void setAfterCloseHandler(@Nullable Consumer<DialogWindow.AfterCloseEvent<S>> afterCloseHandler) Sets the handler to be invoked when the editor screen closes.Note that handler is invoked if the editor is opened in
OpenMode.DIALOG
mode.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.COMMIT)) { System.out.println("Committed"); } }
- Type Parameters:
S
- screen type- Parameters:
afterCloseHandler
- handler to set
-