@StudioAction(category="List Actions", 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.EnabledRule
Action.ActionPerformedEvent, Action.AdjustWhenScreenReadOnly, Action.BeforeActionPerformedHandler, Action.DisabledWhenScreenReadOnly, Action.ExecutableAction, Action.HasBeforeActionPerformedHandler, Action.HasOpenType, Action.HasPrimaryState, Action.HasSecurityConstraint, Action.HasTarget, Action.SecuredAction, Action.Status
Modifier and Type | Field and Description |
---|---|
protected BulkEditors |
bulkEditors |
protected ColumnsMode |
columnsMode |
protected java.lang.String |
exclude |
protected BulkEditors.FieldSorter |
fieldSorter |
static java.lang.String |
ID |
protected java.util.List<java.lang.String> |
includeProperties |
protected java.lang.Boolean |
loadDynamicAttributes |
protected Messages |
messages |
protected OpenMode |
openMode |
protected java.lang.Boolean |
useConfirmDialog |
constraintCode, constraintOperationType, security
target
caption, description, enabled, eventHub, icon, id, owners, primary, shortcut, visible
PROP_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.
|
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(BulkEditors.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(Messages messages) |
void |
setOpenMode(OpenMode openMode)
Sets the bulk editor screen open mode.
|
protected void |
setSecurity(Security security) |
void |
setUseConfirmDialog(java.lang.Boolean useConfirmDialog)
Sets whether or not the confirmation dialog should be displayed to
the user before saving the changes.
|
getConstraintCode, getConstraintOperationType, isApplicable, setConstraintCode, setConstraintOperationType
getTarget, setTarget, withCaption, withDescription, withHandler, withIcon, withPrimary, withShortcut
addActionPerformedListener, addEnabledRule, isEnabledByRule, isEnabledByUiPermissions, isVisibleByUiPermissions, refreshState, removeEnabledRule, setEnabled, setEnabledByUiPermissions, setEnabledInternal, setVisible, setVisibleByUiPermissions, setVisibleInternal
addOwner, addPropertyChangeListener, firePropertyChange, getCaption, getDefaultCaption, getDescription, getEventHub, getIcon, getId, getOwner, getOwners, getShortcutCombination, hasSubscriptions, isEnabled, isPrimary, isVisible, removeOwner, removePropertyChangeListener, setCaption, setDescription, setIcon, setIconFromSet, setPrimary, setShortcut, setShortcutCombination
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addOwner, addPropertyChangeListener, getCaption, getDescription, getIcon, getId, getOwner, getOwners, getShortcutCombination, isEnabled, isVisible, refreshState, removeOwner, removePropertyChangeListener, setCaption, setDescription, setEnabled, setIcon, setIconFromSet, setShortcut, setShortcutCombination, setVisible
public static final java.lang.String ID
protected Messages messages
protected BulkEditors bulkEditors
protected ColumnsMode columnsMode
protected java.lang.String exclude
protected BulkEditors.FieldSorter fieldSorter
protected java.util.List<java.lang.String> includeProperties
protected OpenMode openMode
protected java.lang.Boolean loadDynamicAttributes
protected java.lang.Boolean useConfirmDialog
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(BulkEditors.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)
@Inject protected void setIcons(Icons icons)
@Inject protected void setMessages(Messages messages)
@Inject protected void setSecurity(Security security)
setSecurity
in class SecuredListAction
@Inject public void setBulkEditors(BulkEditors bulkEditors)
protected boolean isPermitted()
BaseAction
isPermitted
in class SecuredListAction
public void actionPerform(Component component)
Action
actionPerform
in interface Action
actionPerform
in class BaseAction
component
- invoking componentpublic void execute()
execute
in interface Action.ExecutableAction