Class StandardCloseAction

java.lang.Object
io.jmix.flowui.screen.StandardCloseAction
All Implemented Interfaces:
ChangeTrackerCloseAction, CloseAction

public class StandardCloseAction extends Object implements CloseAction, ChangeTrackerCloseAction
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 Details

    • actionId

      protected final String actionId
    • checkForUnsavedChanges

      protected final boolean checkForUnsavedChanges
  • Constructor Details

    • StandardCloseAction

      public StandardCloseAction(String actionId)
      Constructs the close action with the given id and checkForUnsavedChanges flag set to true.
      Parameters:
      actionId - an identifier of the close action to distinguish it from other actions of the same type
    • StandardCloseAction

      public StandardCloseAction(String actionId, boolean checkForUnsavedChanges)
      Constructs the close action with the given id and isCheckForUnsavedChanges() flag.
      Parameters:
      actionId - an identifier of the close action to distinguish it from other actions of the same type
      checkForUnsavedChanges - indicates whether the screen using this action should check for unsaved changes
  • Method Details

    • getActionId

      public String getActionId()
      An identifier of the close action to distinguish it from other actions of the same type.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • isCheckForUnsavedChanges

      public boolean isCheckForUnsavedChanges()
      Specified by:
      isCheckForUnsavedChanges in interface ChangeTrackerCloseAction
      Returns:
      true if the screen using this action should prevent close if there are unsaved changes