Package io.jmix.ui.action.screen
Class EditorCommitAndCloseAction<T>
java.lang.Object
io.jmix.ui.action.AbstractAction
io.jmix.ui.action.BaseAction
io.jmix.ui.action.AbstractScreenAction<A,S>
io.jmix.ui.action.screen.OperationResultScreenAction<EditorCommitAndCloseAction<T>,StandardEditor<T>>
io.jmix.ui.action.screen.EditorCommitAndCloseAction<T>
- All Implemented Interfaces:
Action
,Action.AdjustWhenScreenReadOnly
,Action.ExecutableAction
,Action.HasPrimaryState
,Action.OperationResultAction
,Action.ScreenAction<StandardEditor<T>>
,Action.SecuredAction
@StudioAction(target="io.jmix.ui.screen.Screen",
description="Commits changes and closes the screen")
@ActionType("editor_commitClose")
public class EditorCommitAndCloseAction<T>
extends OperationResultScreenAction<EditorCommitAndCloseAction<T>,StandardEditor<T>>
implements Action.AdjustWhenScreenReadOnly
-
Nested Class Summary
Nested classes/interfaces inherited from class io.jmix.ui.action.BaseAction
BaseAction.EnabledRule
Nested classes/interfaces inherited from interface io.jmix.ui.action.Action
Action.ActionPerformedEvent, Action.AdjustWhenScreenReadOnly, Action.ExecutableAction, Action.HasPrimaryState, Action.HasSecurityConstraint, Action.HasTarget, Action.MainTabSheetAction, Action.OperationResultAction, Action.ScreenAction<S extends Screen>, Action.ScreenOpeningAction, Action.SecuredAction, Action.Status
-
Field Summary
Fields inherited from class io.jmix.ui.action.screen.OperationResultScreenAction
failHandler, nextStepSupplier, operationResult, successHandler
Fields inherited from class io.jmix.ui.action.AbstractScreenAction
target
Fields inherited from class io.jmix.ui.action.AbstractAction
caption, description, enabled, eventHub, icon, id, owners, primary, shortcut, visible
Fields inherited from interface io.jmix.ui.action.Action
PROP_CAPTION, PROP_DESCRIPTION, PROP_ENABLED, PROP_ICON, PROP_SHORTCUT, PROP_VISIBLE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
execute()
Executes theAction
protected void
protected boolean
Callback method which is invoked by the action to determine its enabled state.void
void
setMessages
(Messages messages) void
setUiScreenProperties
(UiScreenProperties uiScreenProperties) Methods inherited from class io.jmix.ui.action.screen.OperationResultScreenAction
getOperationResult, setFailHandler, setNextStepSupplier, setSuccessHandler, withFailHandler, withNextStepSupplier, withSuccessHandler
Methods inherited from class io.jmix.ui.action.AbstractScreenAction
actionPerform, checkTarget, getTarget, setTarget, withCaption, withDescription, withEnabled, withEnabledByUiPermissions, withHandler, withIcon, withPrimary, withShortcut, withTarget, withVisible, withVisibleByUiPermissions
Methods inherited from class io.jmix.ui.action.BaseAction
addActionPerformedListener, addEnabledRule, isEnabledByRule, isEnabledByUiPermissions, isPermitted, isVisibleByUiPermissions, refreshState, removeEnabledRule, setEnabled, setEnabledByUiPermissions, setEnabledInternal, setVisible, setVisibleByUiPermissions, setVisibleInternal
Methods inherited from class io.jmix.ui.action.AbstractAction
addOwner, addPropertyChangeListener, firePropertyChange, getCaption, getDescription, getEventHub, getIcon, getId, getOwner, getOwners, getShortcutCombination, hasSubscriptions, isEnabled, isPrimary, isVisible, removeOwner, removePropertyChangeListener, setCaption, setDescription, setIcon, setPrimary, setShortcut, setShortcutCombination
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.jmix.ui.action.Action
actionPerform, addOwner, addPropertyChangeListener, getCaption, getDescription, getIcon, getId, getOwner, getOwners, getShortcutCombination, isEnabled, isVisible, refreshState, removeOwner, removePropertyChangeListener, setCaption, setDescription, setEnabled, setIcon, setShortcut, setShortcutCombination, setVisible
Methods inherited from interface io.jmix.ui.action.Action.AdjustWhenScreenReadOnly
isDisabledWhenScreenReadOnly
-
Field Details
-
ID
- See Also:
-
-
Constructor Details
-
EditorCommitAndCloseAction
public EditorCommitAndCloseAction() -
EditorCommitAndCloseAction
-
-
Method Details
-
initAction
protected void initAction()- Overrides:
initAction
in classAbstractScreenAction<EditorCommitAndCloseAction<T>,
StandardEditor<T>>
-
setIcons
-
setMessages
-
setUiScreenProperties
-
execute
public void execute()Description copied from interface:Action.ExecutableAction
Executes theAction
- Specified by:
execute
in interfaceAction.ExecutableAction
- Overrides:
execute
in classOperationResultScreenAction<EditorCommitAndCloseAction<T>,
StandardEditor<T>>
-
isApplicable
protected boolean isApplicable()Description copied from class:BaseAction
Callback method which is invoked by the action to determine its enabled state.- Overrides:
isApplicable
in classAbstractScreenAction<EditorCommitAndCloseAction<T>,
StandardEditor<T>> - Returns:
- true if the action is enabled for the current context, e.g. there is a selected row in a table
-