Package io.jmix.flowui.action.list
Class ExcludeAction<E>
java.lang.Object
io.jmix.flowui.kit.action.AbstractAction
io.jmix.flowui.kit.action.BaseAction
io.jmix.flowui.action.SecuredBaseAction
io.jmix.flowui.action.list.ListDataComponentAction<A,E>
io.jmix.flowui.action.list.SecuredListDataComponentAction<ExcludeAction<E>,E>
io.jmix.flowui.action.list.ExcludeAction<E>
- All Implemented Interfaces:
AdjustWhenViewReadOnly
,ExecutableAction
,SecuredAction
,SecurityConstraintAction
,TargetAction<ListDataComponent<E>>
,Action
,HasShortcutCombination
@ActionType("exclude")
public class ExcludeAction<E>
extends SecuredListDataComponentAction<ExcludeAction<E>,E>
implements AdjustWhenViewReadOnly
-
Nested Class Summary
Nested classes/interfaces inherited from class io.jmix.flowui.action.SecuredBaseAction
SecuredBaseAction.EnabledRule
-
Field Summary
Modifier and TypeFieldDescriptionprotected Consumer<RemoveOperation.ActionCancelledEvent<E>>
protected Consumer<RemoveOperation.AfterActionPerformedEvent<E>>
protected boolean
protected String
protected String
static final String
protected RemoveOperation
Fields inherited from class io.jmix.flowui.action.list.SecuredListDataComponentAction
accessManager, applicationContext, constraintEntityOp, metadata
Fields inherited from class io.jmix.flowui.action.list.ListDataComponentAction
selectionListenerRegistration, target
Fields inherited from class io.jmix.flowui.action.SecuredBaseAction
enabledByUiPermissions, enabledRules, visibleByUiPermissions
Fields inherited from class io.jmix.flowui.kit.action.BaseAction
enabledExplicitly, visibleExplicitly
Fields inherited from class io.jmix.flowui.kit.action.AbstractAction
description, enabled, eventBus, icon, id, shortcutCombination, text, variant, visible
Fields 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
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
void
execute()
Executes theAction
Returns confirmation dialog header if it was set bysetConfirmationHeader(String)
or in the view XML.Returns confirmation dialog text if it was set bysetConfirmationText(String)
or in the view XML.protected void
boolean
protected boolean
void
setActionCancelledHandler
(Consumer<RemoveOperation.ActionCancelledEvent<E>> actionCancelledHandler) Sets the handler to be invoked if the action was cancelled by the user.void
setAfterActionPerformedHandler
(Consumer<RemoveOperation.AfterActionPerformedEvent<E>> afterActionPerformedHandler) Sets the handler to be invoked after removing entities.void
setConfirmation
(boolean confirmation) Sets whether to ask confirmation from the user.void
setConfirmationHeader
(String confirmationHeader) Sets confirmation dialog header.void
setConfirmationText
(String confirmationText) Sets confirmation dialog text.protected void
setFlowUiComponentProperties
(FlowuiComponentProperties flowUiComponentProperties) protected void
setMessages
(Messages messages) void
setRemoveOperation
(RemoveOperation removeOperation) withAfterActionCancelledHandler
(Consumer<RemoveOperation.ActionCancelledEvent<E>> actionCancelledHandler) withAfterActionPerformedHandler
(Consumer<RemoveOperation.AfterActionPerformedEvent<E>> afterActionPerformedHandler) withConfirmation
(boolean confirmation) withConfirmationHeader
(String confirmationHeader) withConfirmationText
(String confirmationText) Methods inherited from class io.jmix.flowui.action.list.SecuredListDataComponentAction
getConstraintEntityOp, isApplicable, setAccessManager, setApplicationContext, setConstraintEntityOp, setMetadata, withConstraintEntityOp
Methods inherited from class io.jmix.flowui.action.list.ListDataComponentAction
actionPerform, attachSelectionListener, checkTarget, checkTargetItems, getTarget, onSelectionChange, setTarget, withEnabled, withEnabledByUiPermissions, withHandler, withIcon, withIcon, withShortcutCombination, withTarget, withText, withTitle, withVariant, withVisible, withVisibleByUiPermissions
Methods inherited from class io.jmix.flowui.action.SecuredBaseAction
addEnabledRule, isEnabledByRule, isEnabledByUiPermissions, isVisibleByUiPermissions, refreshState, removeEnabledRule, setEnabledByUiPermissions, setVisibleByUiPermissions
Methods inherited from class io.jmix.flowui.kit.action.BaseAction
addActionPerformedListener, setEnabled, setEnabledInternal, setVisible, setVisibleInternal
Methods inherited from class io.jmix.flowui.kit.action.AbstractAction
addPropertyChangeListener, firePropertyChange, getDescription, getEventBus, getIcon, getId, getShortcutCombination, getText, getVariant, hasListener, isEnabled, isVisible, setDescription, setIcon, setShortcutCombination, setText, setVariant
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.jmix.flowui.kit.action.Action
actionPerform, addPropertyChangeListener, getDescription, getIcon, getId, getText, getVariant, isEnabled, isVisible, refreshState, setDescription, setEnabled, setIcon, setText, setVariant, setVisible
Methods inherited from interface io.jmix.flowui.action.AdjustWhenViewReadOnly
isDisabledWhenViewReadOnly
Methods inherited from interface io.jmix.flowui.kit.component.HasShortcutCombination
getShortcutCombination, setShortcutCombination
-
Field Details
-
ID
- See Also:
-
removeOperation
-
confirmation
protected boolean confirmation -
confirmationText
-
confirmationHeader
-
afterActionPerformedHandler
-
actionCancelledHandler
-
-
Constructor Details
-
ExcludeAction
public ExcludeAction() -
ExcludeAction
-
-
Method Details
-
initAction
protected void initAction()- Overrides:
initAction
in classListDataComponentAction<ExcludeAction<E>,
E>
-
setMessages
-
setRemoveOperation
-
setFlowUiComponentProperties
@Autowired protected void setFlowUiComponentProperties(FlowuiComponentProperties flowUiComponentProperties) -
isConfirmation
public boolean isConfirmation()- Returns:
- whether to ask confirmation from the user
-
setConfirmation
public void setConfirmation(boolean confirmation) Sets whether to ask confirmation from the user. -
getConfirmationText
Returns confirmation dialog text if it was set bysetConfirmationText(String)
or in the view XML. Otherwise, returns null. -
setConfirmationText
Sets confirmation dialog text. -
getConfirmationHeader
Returns confirmation dialog header if it was set bysetConfirmationHeader(String)
or in the view XML. Otherwise, returns null. -
setConfirmationHeader
Sets confirmation dialog header. -
setAfterActionPerformedHandler
public void setAfterActionPerformedHandler(@Nullable Consumer<RemoveOperation.AfterActionPerformedEvent<E>> afterActionPerformedHandler) Sets the handler to be invoked after removing entities. -
setActionCancelledHandler
public void setActionCancelledHandler(@Nullable Consumer<RemoveOperation.ActionCancelledEvent<E>> actionCancelledHandler) Sets the handler to be invoked if the action was cancelled by the user. -
isPermitted
protected boolean isPermitted()- Overrides:
isPermitted
in classSecuredListDataComponentAction<ExcludeAction<E>,
E>
-
checkExcludePermission
protected boolean checkExcludePermission() -
execute
public void execute()Description copied from interface:ExecutableAction
Executes theAction
- Specified by:
execute
in interfaceExecutableAction
-
withConfirmation
-
withConfirmationText
-
withConfirmationHeader
-
withAfterActionPerformedHandler
public ExcludeAction<E> withAfterActionPerformedHandler(@Nullable Consumer<RemoveOperation.AfterActionPerformedEvent<E>> afterActionPerformedHandler) -
withAfterActionCancelledHandler
public ExcludeAction<E> withAfterActionCancelledHandler(@Nullable Consumer<RemoveOperation.ActionCancelledEvent<E>> actionCancelledHandler)
-