Package io.jmix.bulkeditor.action
Class BulkEditAction<E>
java.lang.Object
io.jmix.flowui.kit.action.AbstractAction
io.jmix.flowui.kit.action.BaseAction<BulkEditAction<E>>
io.jmix.flowui.action.ObservableBaseAction<BulkEditAction<E>>
io.jmix.flowui.action.SecuredBaseAction<BulkEditAction<E>>
io.jmix.flowui.action.list.ListDataComponentAction<BulkEditAction<E>,E>
io.jmix.flowui.action.list.SecuredListDataComponentAction<BulkEditAction<E>,E>
io.jmix.bulkeditor.action.BulkEditAction<E>
- Type Parameters:
E- entity type
- All Implemented Interfaces:
ExecutableAction,SecurityConstraintAction,TargetAction<ListDataComponent<E>>,Action,HasShortcutCombination
@ActionType("bulked_edit")
public class BulkEditAction<E>
extends SecuredListDataComponentAction<BulkEditAction<E>,E>
implements ExecutableAction
Standard action for changing attribute values for several entity instances at once.
Should be defined for a list data component 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.flowui.action.SecuredBaseAction
SecuredBaseAction.EnabledRule -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected BulkEditorsprotected Stringprotected Function<List<MetaProperty>, Map<MetaProperty, Integer>> static final Stringprotected booleanprotected booleanFields inherited from class io.jmix.flowui.action.list.SecuredListDataComponentAction
accessManager, applicationContext, constraintEntityOp, metadataFields inherited from class io.jmix.flowui.action.list.ListDataComponentAction
selectionListenerRegistration, targetFields inherited from class io.jmix.flowui.action.SecuredBaseAction
enabledRulesFields inherited from class io.jmix.flowui.action.ObservableBaseAction
uiObservationSupportFields inherited from class io.jmix.flowui.kit.action.BaseAction
enabledExplicitly, visibleExplicitlyFields inherited from class io.jmix.flowui.kit.action.AbstractAction
description, enabled, eventBus, icon, id, shortcutCombination, text, variant, visibleFields inherited from interface io.jmix.flowui.kit.action.Action
PROP_DESCRIPTION, PROP_ENABLED, PROP_ICON, PROP_SHORTCUT_COMBINATION, PROP_TEXT, PROP_VARIANT, PROP_VISIBLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute()Executes the action.@Nullable Stringbooleanprotected booleanprotected booleanprotected voidsetAccessManager(AccessManager accessManager) voidsetBulkEditors(BulkEditors bulkEditors) voidsetExclude(String exclude) voidsetFieldSorter(Function<List<MetaProperty>, Map<MetaProperty, Integer>> fieldSorter) protected voidvoidsetIncludeProperties(List<String> includeProperties) protected voidsetMessages(Messages messages) voidsetUseConfirmDialog(boolean useConfirmDialog) protected voidsetVisibleInternal(boolean visible) withExclude(String exclude) withFieldSorter(Function<List<MetaProperty>, Map<MetaProperty, Integer>> fieldSorter) withIncludeProperties(List<String> includeProperties) withUseConfirmDialog(boolean useConfirmDialog) Methods inherited from class io.jmix.flowui.action.list.SecuredListDataComponentAction
getConstraintEntityOp, isApplicable, setApplicationContext, setConstraintEntityOp, setMetadata, withConstraintEntityOpMethods inherited from class io.jmix.flowui.action.list.ListDataComponentAction
actionPerform, attachSelectionListener, checkTarget, checkTargetItems, getTarget, initAction, onSelectionChange, setTarget, withTargetMethods inherited from class io.jmix.flowui.action.SecuredBaseAction
addEnabledRule, isEnabledByRule, refreshState, removeEnabledRuleMethods inherited from class io.jmix.flowui.action.ObservableBaseAction
getUiObservationSupportMethods inherited from class io.jmix.flowui.kit.action.BaseAction
addActionPerformedListener, self, setEnabled, setEnabledInternal, setVisible, withDescription, withEnabled, withHandler, withIcon, withShortcutCombination, withText, withVariant, withVisibleMethods inherited from class io.jmix.flowui.kit.action.AbstractAction
addPropertyChangeListener, firePropertyChange, getDescription, getEventBus, getIcon, getIconComponent, getId, getShortcutCombination, getText, getVariant, hasListener, isEnabled, isVisible, setDescription, setIcon, setIconComponent, setShortcutCombination, setText, setVariantMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.jmix.flowui.kit.action.Action
actionPerform, addPropertyChangeListener, getDescription, getIcon, getIconComponent, getId, getText, getVariant, isEnabled, isVisible, refreshState, setDescription, setEnabled, setIcon, setIconComponent, setText, setVariant, setVisibleMethods inherited from interface io.jmix.flowui.kit.component.HasShortcutCombination
getShortcutCombination, setShortcutCombination
-
Field Details
-
ID
- See Also:
-
bulkEditors
-
exclude
-
fieldSorter
-
includeProperties
-
useConfirmDialog
protected boolean useConfirmDialog -
visibleBySpecificUiPermission
protected boolean visibleBySpecificUiPermission
-
-
Constructor Details
-
BulkEditAction
public BulkEditAction() -
BulkEditAction
-
-
Method Details
-
getExclude
- Returns:
- regular expression to exclude fields if it was set by
setExclude(String)or in the screen XML. Otherwise, returns null
-
setExclude
- Parameters:
exclude- regular expression to exclude some fields explicitly from the list of attributes available for editing
-
setFieldSorter
- Parameters:
fieldSorter- function to sort fields by custom logic
-
getIncludeProperties
- Returns:
- 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
- Parameters:
includeProperties- entity attributes to be included to bulk editor window. If set, other attributes will be ignored
-
getUseConfirmDialog
public boolean getUseConfirmDialog()- Returns:
- true/false whether confirmation dialog
setUseConfirmDialog(boolean)is used.
-
setUseConfirmDialog
public void setUseConfirmDialog(boolean useConfirmDialog) - Parameters:
useConfirmDialog- flag whether the confirmation dialog should be displayed to the user before saving the changes. The default value is true
-
setMessages
-
setIcons
-
setAccessManager
- Overrides:
setAccessManagerin classSecuredListDataComponentAction<BulkEditAction<E>,E>
-
isVisibleBySpecificUiPermission
protected boolean isVisibleBySpecificUiPermission() -
setVisibleInternal
protected void setVisibleInternal(boolean visible) - Overrides:
setVisibleInternalin classBaseAction<BulkEditAction<E>>
-
setBulkEditors
-
isPermitted
protected boolean isPermitted()- Overrides:
isPermittedin classSecuredListDataComponentAction<BulkEditAction<E>,E>
-
execute
public void execute()Executes the action.- Specified by:
executein interfaceExecutableAction
-
withExclude
- See Also:
-
withFieldSorter
public BulkEditAction<E> withFieldSorter(Function<List<MetaProperty>, Map<MetaProperty, Integer>> fieldSorter) - See Also:
-
withIncludeProperties
- See Also:
-
withUseConfirmDialog
- See Also:
-