Class BulkEditAction

All Implemented Interfaces:
Action, Action.ExecutableAction, Action.HasPrimaryState, Action.HasSecurityConstraint, Action.HasTarget, Action.SecuredAction

@StudioAction(target="io.jmix.ui.component.ListComponent", description="Opens an editor for changing attribute values for several entity instances at once") @ActionType("bulkEdit") public class BulkEditAction extends SecuredListAction implements Action.ExecutableAction
Standard action for changing attribute values for several entity instances at once.

Should be defined for a list component (Table, DataGrid, etc.) in a screen XML descriptor.

The action instance can be parameterized using the nested properties XML element or programmatically in the screen controller.

  • Field Details

    • ID

      public static final String ID
      See Also:
    • messages

      protected Messages messages
    • bulkEditors

      protected BulkEditors bulkEditors
    • columnsMode

      protected ColumnsMode columnsMode
    • exclude

      protected String exclude
    • fieldSorter

      protected FieldSorter fieldSorter
    • includeProperties

      protected List<String> includeProperties
    • openMode

      protected OpenMode openMode
    • loadDynamicAttributes

      protected Boolean loadDynamicAttributes
    • useConfirmDialog

      protected Boolean useConfirmDialog
    • visibleBySpecificUiPermission

      protected boolean visibleBySpecificUiPermission
  • Constructor Details

    • BulkEditAction

      public BulkEditAction()
    • BulkEditAction

      public BulkEditAction(String id)
  • Method Details

    • getColumnsMode

      @Nullable public ColumnsMode getColumnsMode()
      Returns the columns mode which defines the number of columns either it was set by setColumnsMode(ColumnsMode) or in the screen XML. Otherwise returns null.
    • setColumnsMode

      @StudioPropertiesItem(defaultValue="TWO_COLUMNS") public void setColumnsMode(ColumnsMode columnsMode)
      Sets the columns mode which defines the number of columns.
      See Also:
    • getExclude

      @Nullable public String getExclude()
      Returns a regular expression to exclude fields if it was set by setExclude(String) or in the screen XML. Otherwise returns null.
    • setExclude

      @StudioPropertiesItem public void setExclude(String exclude)
      Sets a regular expression to exclude some fields explicitly from the list of attributes available for editing.
    • setFieldSorter

      public void setFieldSorter(FieldSorter fieldSorter)
      Sets field sorter that allows you to sort fields by custom logic.
    • getIncludeProperties

      @Nullable public List<String> getIncludeProperties()
      Returns a list entity attributes to be included to bulk editor window if it was set by setIncludeProperties(List) or in the screen XML. Otherwise returns null.
    • setIncludeProperties

      @StudioPropertiesItem(type=STRING) public void setIncludeProperties(List<String> includeProperties)
      Sets the entity attributes to be included to bulk editor window. If set, other attributes will be ignored.
    • getOpenMode

      @Nullable public OpenMode getOpenMode()
      Returns the bulk editor screen open mode if it was set by setOpenMode(OpenMode) or in the screen XML. Otherwise returns null.
    • setOpenMode

      @StudioPropertiesItem(defaultValue="DIALOG") public void setOpenMode(OpenMode openMode)
      Sets the bulk editor screen open mode.
    • getLoadDynamicAttributes

      @Nullable public Boolean getLoadDynamicAttributes()
      Returns true/false if the flag was set by setLoadDynamicAttributes(Boolean) or in the screen XML. Otherwise returns null.
    • setLoadDynamicAttributes

      @StudioPropertiesItem(defaultValue="true") public void setLoadDynamicAttributes(Boolean loadDynamicAttributes)
      Sets whether dynamic attributes of the edited entity should be displayed on the entity's bulk editor screen. The default value is true.
    • getUseConfirmDialog

      @Nullable public Boolean getUseConfirmDialog()
      Returns true/false if the flag was set by setUseConfirmDialog(Boolean) or in the screen XML. Otherwise returns null.
    • setUseConfirmDialog

      @StudioPropertiesItem(defaultValue="true") public void setUseConfirmDialog(Boolean useConfirmDialog)
      Sets whether or not the confirmation dialog should be displayed to the user before saving the changes. The default value is true.
    • setIcons

      @Autowired protected void setIcons(Icons icons)
    • setMessages

      @Autowired protected void setMessages(Messages messages)
    • setAccessManager

      @Autowired protected void setAccessManager(AccessManager accessManager)
      Overrides:
      setAccessManager in class SecuredListAction
    • isVisibleByUiPermissions

      public boolean isVisibleByUiPermissions()
      Specified by:
      isVisibleByUiPermissions in interface Action.SecuredAction
      Overrides:
      isVisibleByUiPermissions in class BaseAction
    • setBulkEditors

      @Autowired public void setBulkEditors(BulkEditors bulkEditors)
    • isPermitted

      protected boolean isPermitted()
      Description copied from class: BaseAction
      Callback method which is invoked by the action to determine its enabled state.
      Overrides:
      isPermitted in class SecuredListAction
      Returns:
      true if the action is enabled for the current user
    • actionPerform

      public void actionPerform(Component component)
      Description copied from interface: Action
      Invoked by owning component to execute the action.
      Specified by:
      actionPerform in interface Action
      Overrides:
      actionPerform in class BaseAction
      Parameters:
      component - invoking component
    • execute

      public void execute()
      Executes the action.
      Specified by:
      execute in interface Action.ExecutableAction