Package io.jmix.ui.action.list
Class BulkEditAction
java.lang.Object
io.jmix.ui.action.AbstractAction
io.jmix.ui.action.BaseAction
io.jmix.ui.action.ListAction
io.jmix.ui.action.list.SecuredListAction
io.jmix.ui.action.list.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.
-
Nested Class Summary
Nested classes/interfaces inherited from class io.jmix.ui.action.BaseAction
BaseAction.EnabledRuleNested 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.ScreenOpeningAction, Action.SecuredAction, Action.Status -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected BulkEditorsprotected ColumnsModeprotected Stringprotected FieldSorterstatic final Stringprotected Booleanprotected Messagesprotected OpenModeprotected Booleanprotected booleanFields inherited from class io.jmix.ui.action.list.SecuredListAction
accessManager, applicationContext, constraintEntityOp, metadataFields inherited from class io.jmix.ui.action.ListAction
targetFields inherited from class io.jmix.ui.action.AbstractAction
caption, description, enabled, eventHub, icon, id, owners, primary, shortcut, visibleFields inherited from interface io.jmix.ui.action.Action
PROP_CAPTION, PROP_DESCRIPTION, PROP_ENABLED, PROP_ICON, PROP_SHORTCUT, PROP_VISIBLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactionPerform(Component component) Invoked by owning component to execute the action.voidexecute()Executes the action.Returns the columns mode which defines the number of columns either it was set bysetColumnsMode(ColumnsMode)or in the screen XML.Returns a regular expression to exclude fields if it was set bysetExclude(String)or in the screen XML.Returns a list entity attributes to be included to bulk editor window if it was set bysetIncludeProperties(List)or in the screen XML.Returns true/false if the flag was set bysetLoadDynamicAttributes(Boolean)or in the screen XML.Returns the bulk editor screen open mode if it was set bysetOpenMode(OpenMode)or in the screen XML.Returns true/false if the flag was set bysetUseConfirmDialog(Boolean)or in the screen XML.protected booleanCallback method which is invoked by the action to determine its enabled state.booleanprotected voidsetAccessManager(AccessManager accessManager) voidsetBulkEditors(BulkEditors bulkEditors) voidsetColumnsMode(ColumnsMode columnsMode) Sets the columns mode which defines the number of columns.voidsetExclude(String exclude) Sets a regular expression to exclude some fields explicitly from the list of attributes available for editing.voidsetFieldSorter(FieldSorter fieldSorter) Sets field sorter that allows you to sort fields by custom logic.protected voidvoidsetIncludeProperties(List<String> includeProperties) Sets the entity attributes to be included to bulk editor window.voidsetLoadDynamicAttributes(Boolean loadDynamicAttributes) Sets whether dynamic attributes of the edited entity should be displayed on the entity's bulk editor screen.protected voidsetMessages(Messages messages) voidsetOpenMode(OpenMode openMode) Sets the bulk editor screen open mode.voidsetUseConfirmDialog(Boolean useConfirmDialog) Sets whether or not the confirmation dialog should be displayed to the user before saving the changes.Methods inherited from class io.jmix.ui.action.list.SecuredListAction
getConstraintEntityOp, isApplicable, setApplicationContext, setConstraintEntityOp, setMetadataMethods inherited from class io.jmix.ui.action.ListAction
getTarget, setTarget, withCaption, withDescription, withHandler, withIcon, withPrimary, withShortcutMethods inherited from class io.jmix.ui.action.BaseAction
addActionPerformedListener, addEnabledRule, isEnabledByRule, isEnabledByUiPermissions, refreshState, removeEnabledRule, setEnabled, setEnabledByUiPermissions, setEnabledInternal, setVisible, setVisibleByUiPermissions, setVisibleInternalMethods 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, setShortcutCombinationMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.jmix.ui.action.Action
addOwner, addPropertyChangeListener, getCaption, getDescription, getIcon, getId, getOwner, getOwners, getShortcutCombination, isEnabled, isVisible, refreshState, removeOwner, removePropertyChangeListener, setCaption, setDescription, setEnabled, setIcon, setShortcut, setShortcutCombination, setVisible
-
Field Details
-
ID
- See Also:
-
messages
-
bulkEditors
-
columnsMode
-
exclude
-
fieldSorter
-
includeProperties
-
openMode
-
loadDynamicAttributes
-
useConfirmDialog
-
visibleBySpecificUiPermission
protected boolean visibleBySpecificUiPermission
-
-
Constructor Details
-
BulkEditAction
public BulkEditAction() -
BulkEditAction
-
-
Method Details
-
getColumnsMode
Returns the columns mode which defines the number of columns either it was set bysetColumnsMode(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. -
getExclude
Returns a regular expression to exclude fields if it was set bysetExclude(String)or in the screen XML. Otherwise returns null. -
setExclude
Sets a regular expression to exclude some fields explicitly from the list of attributes available for editing. -
setFieldSorter
Sets field sorter that allows you to sort fields by custom logic. -
getIncludeProperties
Returns a list entity attributes to be included to bulk editor window if it was set bysetIncludeProperties(List)or in the screen XML. Otherwise returns null. -
setIncludeProperties
Sets the entity attributes to be included to bulk editor window. If set, other attributes will be ignored. -
getOpenMode
Returns the bulk editor screen open mode if it was set bysetOpenMode(OpenMode)or in the screen XML. Otherwise returns null. -
setOpenMode
Sets the bulk editor screen open mode. -
getLoadDynamicAttributes
Returns true/false if the flag was set bysetLoadDynamicAttributes(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
Returns true/false if the flag was set bysetUseConfirmDialog(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
-
setMessages
-
setAccessManager
- Overrides:
setAccessManagerin classSecuredListAction
-
isVisibleByUiPermissions
public boolean isVisibleByUiPermissions()- Specified by:
isVisibleByUiPermissionsin interfaceAction.SecuredAction- Overrides:
isVisibleByUiPermissionsin classBaseAction
-
setBulkEditors
-
isPermitted
protected boolean isPermitted()Description copied from class:BaseActionCallback method which is invoked by the action to determine its enabled state.- Overrides:
isPermittedin classSecuredListAction- Returns:
- true if the action is enabled for the current user
-
actionPerform
Description copied from interface:ActionInvoked by owning component to execute the action.- Specified by:
actionPerformin interfaceAction- Overrides:
actionPerformin classBaseAction- Parameters:
component- invoking component
-
execute
public void execute()Executes the action.- Specified by:
executein interfaceAction.ExecutableAction
-