Class EntityOpenAction<E>
java.lang.Object
io.jmix.flowui.kit.action.AbstractAction
io.jmix.flowui.kit.action.BaseAction
io.jmix.flowui.action.SecuredBaseAction
io.jmix.flowui.action.valuepicker.PickerAction<EntityOpenAction<E>,EntityPickerComponent<E>,E>
io.jmix.flowui.action.entitypicker.EntityOpenAction<E>
- All Implemented Interfaces:
ExecutableAction
,ScreenOpeningAction
,SecuredAction
,TargetAction<EntityPickerComponent<E>>
,Action
- Direct Known Subclasses:
EntityOpenCompositionAction
@ActionType("entity_open")
public class EntityOpenAction<E>
extends PickerAction<EntityOpenAction<E>,EntityPickerComponent<E>,E>
implements ScreenOpeningAction
-
Field Summary
Modifier and TypeFieldDescriptionprotected DialogWindowBuilders
static final String
protected Messages
protected Notifications
protected ActionScreenInitializer
Fields inherited from class io.jmix.flowui.action.valuepicker.PickerAction
target
Fields inherited from class io.jmix.flowui.action.SecuredBaseAction
enabledByUiPermissions, visibleByUiPermissions
Fields inherited from class io.jmix.flowui.kit.action.BaseAction
enabledExplicitly, visibleExplicitly
Fields inherited from class io.jmix.flowui.kit.action.AbstractAction
description, enabled, eventBus, icon, id, shortcutCombination, text, variant, visible
Fields inherited from interface io.jmix.flowui.kit.action.Action
PROP_DESCRIPTION, PROP_ENABLED, PROP_ICON, PROP_SHORTCUT, PROP_TEXT, PROP_VARIANT, PROP_VISIBLE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
execute()
Executes theAction
Returns the screen open mode if it was set byScreenOpeningAction.setOpenMode(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 byScreenOpeningAction.setScreenClass(Class)
or in the screen XML, otherwise returnsnull
.Returns the screen id if it was set byScreenOpeningAction.setScreenId(String)
or in the screen XML, otherwise returnsnull
.protected void
protected boolean
isEmpty()
<S extends Screen<?>>
voidsetAfterCloseHandler
(Consumer<DialogWindow.AfterCloseEvent<S>> afterCloseHandler) Sets the handler to be invoked when the editor screen closes.void
setAfterCommitHandler
(Consumer<E> afterCommitHandler) void
setDialogBuilders
(DialogWindowBuilders dialogBuilders) protected void
setFlowUiComponentProperties
(FlowUiComponentProperties flowUiComponentProperties) void
setMessages
(Messages messages) void
setNotifications
(Notifications notifications) 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.void
setTarget
(EntityPickerComponent<E> target) void
setTransformation
(Function<E, E> transformation) withAfterCommitHandler
(Consumer<E> afterCommitHandler) withTransformation
(Function<E, E> transformation) Methods inherited from class io.jmix.flowui.action.valuepicker.PickerAction
actionPerform, checkTarget, getTarget, isApplicable, withEnabled, withEnabledByUiPermissions, withHandler, withIcon, withIcon, withShortcutCombination, withTarget, withText, withTitle, withVariant, withVisible, withVisibleByUiPermissions
Methods inherited from class io.jmix.flowui.action.SecuredBaseAction
isEnabledByUiPermissions, isPermitted, isVisibleByUiPermissions, refreshState, setEnabledByUiPermissions, setVisibleByUiPermissions
Methods inherited from class io.jmix.flowui.kit.action.BaseAction
addActionPerformedListener, setEnabled, setEnabledInternal, setVisible, setVisibleInternal
Methods inherited from class io.jmix.flowui.kit.action.AbstractAction
addPropertyChangeListener, firePropertyChange, getDescription, getEventBus, getIcon, getId, getShortcutCombination, getText, getVariant, hasListener, isEnabled, isVisible, setDescription, setIcon, setShortcutCombination, setText, setVariant
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
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
-
Field Details
-
ID
- See Also:
-
messages
-
notifications
-
dialogBuilders
-
screenInitializer
-
afterCommitHandler
-
transformation
-
-
Constructor Details
-
EntityOpenAction
public EntityOpenAction() -
EntityOpenAction
-
-
Method Details
-
initAction
protected void initAction()- Overrides:
initAction
in classPickerAction<EntityOpenAction<E>,
EntityPickerComponent<E>, E>
-
setDialogBuilders
-
setNotifications
-
setMessages
-
setFlowUiComponentProperties
@Autowired protected void setFlowUiComponentProperties(FlowUiComponentProperties flowUiComponentProperties) -
setTarget
- Specified by:
setTarget
in interfaceTargetAction<E>
- Overrides:
setTarget
in classPickerAction<EntityOpenAction<E>,
EntityPickerComponent<E>, E>
-
setAfterCommitHandler
-
setTransformation
-
getOpenMode
Description copied from interface:ScreenOpeningAction
Returns the screen open mode if it was set byScreenOpeningAction.setOpenMode(OpenMode)
or in the screen XML, otherwise returnsnull
.- Specified by:
getOpenMode
in interfaceScreenOpeningAction
-
setOpenMode
Description copied from interface:ScreenOpeningAction
Sets the screen open mode.- Specified by:
setOpenMode
in interfaceScreenOpeningAction
- Parameters:
openMode
- the open mode to set
-
getScreenId
Description copied from interface:ScreenOpeningAction
Returns the screen id if it was set byScreenOpeningAction.setScreenId(String)
or in the screen XML, otherwise returnsnull
.- Specified by:
getScreenId
in interfaceScreenOpeningAction
-
setScreenId
Description copied from interface:ScreenOpeningAction
Sets the screen id.- Specified by:
setScreenId
in interfaceScreenOpeningAction
- Parameters:
screenId
- the screen id to set
-
getScreenClass
Description copied from interface:ScreenOpeningAction
Returns the screen class if it was set byScreenOpeningAction.setScreenClass(Class)
or in the screen XML, otherwise returnsnull
.- Specified by:
getScreenClass
in interfaceScreenOpeningAction
-
setScreenClass
Description copied from interface:ScreenOpeningAction
Sets the screen class.- Specified by:
setScreenClass
in interfaceScreenOpeningAction
- Parameters:
screenClass
- the screen class to set
-
getRouteParameters
@Nullable public com.vaadin.flow.router.RouteParameters getRouteParameters()- Specified by:
getRouteParameters
in interfaceScreenOpeningAction
- Returns:
- route parameters or
null
if not set
-
setRouteParameters
public void setRouteParameters(@Nullable com.vaadin.flow.router.RouteParameters routeParameters) Description copied from interface:ScreenOpeningAction
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
.- Specified by:
setRouteParameters
in interfaceScreenOpeningAction
- Parameters:
routeParameters
- route parameters to set- See Also:
-
Route
-
getQueryParameters
@Nullable public com.vaadin.flow.router.QueryParameters getQueryParameters()- Specified by:
getQueryParameters
in interfaceScreenOpeningAction
- Returns:
- query parameters or
null
if not set
-
setQueryParameters
public void setQueryParameters(@Nullable com.vaadin.flow.router.QueryParameters queryParameters) Description copied from interface:ScreenOpeningAction
Sets query parameters that should be used in the URL.Note that query parameters are set if the editor is opened in
OpenMode.NAVIGATION
.- Specified by:
setQueryParameters
in interfaceScreenOpeningAction
- Parameters:
queryParameters
- query parameters to set
-
setAfterCloseHandler
public <S extends Screen<?>> void setAfterCloseHandler(@Nullable Consumer<DialogWindow.AfterCloseEvent<S>> afterCloseHandler) Description copied from interface:ScreenOpeningAction
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"); } }
- Specified by:
setAfterCloseHandler
in interfaceScreenOpeningAction
- Type Parameters:
S
- screen type- Parameters:
afterCloseHandler
- handler to set
-
execute
public void execute()Description copied from interface:ExecutableAction
Executes theAction
- Specified by:
execute
in interfaceExecutableAction
-
withAfterCommitHandler
-
withTransformation
-
isEmpty
protected boolean isEmpty()
-