Package io.jmix.flowui.screen
Class StandardCloseAction
java.lang.Object
io.jmix.flowui.screen.StandardCloseAction
- All Implemented Interfaces:
ChangeTrackerCloseAction
,CloseAction
A close action implementation used in the base screens provided by the framework:
Screen
,
StandardEditor
, StandardLookup
.
If its isCheckForUnsavedChanges()
flag is set to true, the screen checks if it contains unsaved changes and asks the
user whether to commit or discard them.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionStandardCloseAction
(String actionId) Constructs the close action with the given id andcheckForUnsavedChanges
flag set to true.StandardCloseAction
(String actionId, boolean checkForUnsavedChanges) Constructs the close action with the given id andisCheckForUnsavedChanges()
flag. -
Method Summary
Modifier and TypeMethodDescriptionAn identifier of the close action to distinguish it from other actions of the same type.boolean
toString()
-
Field Details
-
actionId
-
checkForUnsavedChanges
protected final boolean checkForUnsavedChanges
-
-
Constructor Details
-
StandardCloseAction
Constructs the close action with the given id andcheckForUnsavedChanges
flag set to true.- Parameters:
actionId
- an identifier of the close action to distinguish it from other actions of the same type
-
StandardCloseAction
Constructs the close action with the given id andisCheckForUnsavedChanges()
flag.- Parameters:
actionId
- an identifier of the close action to distinguish it from other actions of the same typecheckForUnsavedChanges
- indicates whether the screen using this action should check for unsaved changes
-
-
Method Details
-
getActionId
An identifier of the close action to distinguish it from other actions of the same type. -
toString
-
isCheckForUnsavedChanges
public boolean isCheckForUnsavedChanges()- Specified by:
isCheckForUnsavedChanges
in interfaceChangeTrackerCloseAction
- Returns:
- true if the screen using this action should prevent close if there are unsaved changes
-