Class StandardCloseAction

java.lang.Object
io.jmix.flowui.view.StandardCloseAction
All Implemented Interfaces:
ChangeTrackerCloseAction, CloseAction
Direct Known Subclasses:
NavigateCloseAction

public class StandardCloseAction extends Object implements CloseAction, ChangeTrackerCloseAction
A close action implementation used in the base views provided by the framework: View, StandardDetailView, StandardListView.

If its isCheckForUnsavedChanges() flag is set to true, the view checks if it contains unsaved changes and asks the user whether to save 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 view 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 view using this action should prevent close if there are unsaved changes