@StudioAction(target="io.jmix.ui.component.ListComponent", description="Opens an editor for changing attribute values for several entity instances at once") @ActionType(value="bulkEdit") public class BulkEditAction extends SecuredListAction implements Action.ExecutableAction
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.
BaseAction.EnabledRuleAction.ActionPerformedEvent, Action.AdjustWhenScreenReadOnly, Action.ExecutableAction, Action.HasPrimaryState, Action.HasSecurityConstraint, Action.HasTarget, Action.MainTabSheetAction, Action.ScreenOpeningAction, Action.SecuredAction, Action.Status| Modifier and Type | Field and Description |
|---|---|
protected BulkEditors |
bulkEditors |
protected ColumnsMode |
columnsMode |
protected java.lang.String |
exclude |
protected FieldSorter |
fieldSorter |
static java.lang.String |
ID |
protected java.util.List<java.lang.String> |
includeProperties |
protected java.lang.Boolean |
loadDynamicAttributes |
protected io.jmix.core.Messages |
messages |
protected OpenMode |
openMode |
protected java.lang.Boolean |
useConfirmDialog |
protected boolean |
visibleBySpecificUiPermission |
accessManager, constraintEntityOp, metadatatargetcaption, description, enabled, eventHub, icon, id, owners, primary, shortcut, visiblePROP_CAPTION, PROP_DESCRIPTION, PROP_ENABLED, PROP_ICON, PROP_SHORTCUT, PROP_VISIBLE| Constructor and Description |
|---|
BulkEditAction() |
BulkEditAction(java.lang.String id) |
| Modifier and Type | Method and Description |
|---|---|
void |
actionPerform(Component component)
Invoked by owning component to execute the action.
|
void |
execute()
Executes the action.
|
ColumnsMode |
getColumnsMode()
Returns the columns mode which defines the number of columns either it was set by
setColumnsMode(ColumnsMode)
or in the screen XML. |
java.lang.String |
getExclude()
Returns a regular expression to exclude fields if it was set by
setExclude(String) or in the screen XML. |
java.util.List<java.lang.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. |
java.lang.Boolean |
getLoadDynamicAttributes()
Returns true/false if the flag was set by
setLoadDynamicAttributes(Boolean) or in the screen XML. |
OpenMode |
getOpenMode()
Returns the bulk editor screen open mode if it was set by
setOpenMode(OpenMode) or in the screen XML. |
java.lang.Boolean |
getUseConfirmDialog()
Returns true/false if the flag was set by
setUseConfirmDialog(Boolean) or in the screen XML. |
protected boolean |
isPermitted()
Callback method which is invoked by the action to determine its enabled state.
|
boolean |
isVisibleByUiPermissions() |
protected void |
setAccessManager(io.jmix.core.AccessManager accessManager) |
void |
setBulkEditors(BulkEditors bulkEditors) |
void |
setColumnsMode(ColumnsMode columnsMode)
Sets the columns mode which defines the number of columns.
|
void |
setExclude(java.lang.String exclude)
Sets a regular expression to exclude some fields explicitly
from the list of attributes available for editing.
|
void |
setFieldSorter(FieldSorter fieldSorter)
Sets field sorter that allows you to sort fields by custom logic.
|
protected void |
setIcons(Icons icons) |
void |
setIncludeProperties(java.util.List<java.lang.String> includeProperties)
Sets the entity attributes to be included to bulk editor window.
|
void |
setLoadDynamicAttributes(java.lang.Boolean loadDynamicAttributes)
Sets whether dynamic attributes of the edited entity should be displayed on
the entity's bulk editor screen.
|
protected void |
setMessages(io.jmix.core.Messages messages) |
void |
setOpenMode(OpenMode openMode)
Sets the bulk editor screen open mode.
|
void |
setUseConfirmDialog(java.lang.Boolean useConfirmDialog)
Sets whether or not the confirmation dialog should be displayed to
the user before saving the changes.
|
getConstraintEntityOp, isApplicable, setConstraintEntityOp, setMetadatagetTarget, setTarget, withCaption, withDescription, withHandler, withIcon, withPrimary, withShortcutaddActionPerformedListener, addEnabledRule, isEnabledByRule, isEnabledByUiPermissions, refreshState, removeEnabledRule, setEnabled, setEnabledByUiPermissions, setEnabledInternal, setVisible, setVisibleByUiPermissions, setVisibleInternaladdOwner, addPropertyChangeListener, firePropertyChange, getCaption, getDescription, getEventHub, getIcon, getId, getOwner, getOwners, getShortcutCombination, hasSubscriptions, isEnabled, isPrimary, isVisible, removeOwner, removePropertyChangeListener, setCaption, setDescription, setIcon, setPrimary, setShortcut, setShortcutCombinationclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddOwner, addPropertyChangeListener, getCaption, getDescription, getIcon, getId, getOwner, getOwners, getShortcutCombination, isEnabled, isVisible, refreshState, removeOwner, removePropertyChangeListener, setCaption, setDescription, setEnabled, setIcon, setShortcut, setShortcutCombination, setVisiblepublic static final java.lang.String ID
protected io.jmix.core.Messages messages
protected BulkEditors bulkEditors
protected ColumnsMode columnsMode
protected java.lang.String exclude
protected FieldSorter fieldSorter
protected java.util.List<java.lang.String> includeProperties
protected OpenMode openMode
protected java.lang.Boolean loadDynamicAttributes
protected java.lang.Boolean useConfirmDialog
protected boolean visibleBySpecificUiPermission
public BulkEditAction()
public BulkEditAction(java.lang.String id)
@Nullable public ColumnsMode getColumnsMode()
setColumnsMode(ColumnsMode)
or in the screen XML. Otherwise returns null.@StudioPropertiesItem(defaultValue="TWO_COLUMNS") public void setColumnsMode(ColumnsMode columnsMode)
ColumnsMode.ONE_COLUMN,
ColumnsMode.TWO_COLUMNS@Nullable public java.lang.String getExclude()
setExclude(String) or in the screen XML.
Otherwise returns null.@StudioPropertiesItem public void setExclude(java.lang.String exclude)
public void setFieldSorter(FieldSorter fieldSorter)
@Nullable public java.util.List<java.lang.String> getIncludeProperties()
setIncludeProperties(List) or in the screen XML.
Otherwise returns null.@StudioPropertiesItem(type=STRING) public void setIncludeProperties(java.util.List<java.lang.String> includeProperties)
@Nullable public OpenMode getOpenMode()
setOpenMode(OpenMode) or in the screen XML.
Otherwise returns null.@StudioPropertiesItem(defaultValue="DIALOG") public void setOpenMode(OpenMode openMode)
@Nullable public java.lang.Boolean getLoadDynamicAttributes()
setLoadDynamicAttributes(Boolean) or in the screen XML.
Otherwise returns null.@StudioPropertiesItem(defaultValue="true") public void setLoadDynamicAttributes(java.lang.Boolean loadDynamicAttributes)
@Nullable public java.lang.Boolean getUseConfirmDialog()
setUseConfirmDialog(Boolean) or in the screen XML.
Otherwise returns null.@StudioPropertiesItem(defaultValue="true") public void setUseConfirmDialog(java.lang.Boolean useConfirmDialog)
@Autowired protected void setIcons(Icons icons)
@Autowired protected void setMessages(io.jmix.core.Messages messages)
@Autowired protected void setAccessManager(io.jmix.core.AccessManager accessManager)
setAccessManager in class SecuredListActionpublic boolean isVisibleByUiPermissions()
isVisibleByUiPermissions in interface Action.SecuredActionisVisibleByUiPermissions in class BaseAction@Autowired public void setBulkEditors(BulkEditors bulkEditors)
protected boolean isPermitted()
BaseActionisPermitted in class SecuredListActionpublic void actionPerform(Component component)
ActionactionPerform in interface ActionactionPerform in class BaseActioncomponent - invoking componentpublic void execute()
execute in interface Action.ExecutableAction