Package io.jmix.flowui.action.list
Class ListDataComponentAction<A extends ListDataComponentAction<A,E>,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>
- All Implemented Interfaces:
ExecutableAction
,SecuredAction
,TargetAction<ListDataComponent<E>>
,Action
,HasShortcutCombination
- Direct Known Subclasses:
AddAction
,CreateAction
,ExportAction
,RefreshAction
,RunListEntityReportAction
,RunReportAction
,SecuredListDataComponentAction
,ShowExecutionReportHistoryAction
,ShowPivotTableAction
public abstract class ListDataComponentAction<A extends ListDataComponentAction<A,E>,E>
extends SecuredBaseAction
implements TargetAction<ListDataComponent<E>>, ExecutableAction
-
Nested Class Summary
Nested classes/interfaces inherited from class io.jmix.flowui.action.SecuredBaseAction
SecuredBaseAction.EnabledRule
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected com.vaadin.flow.shared.Registration
protected ListDataComponent<E>
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
actionPerform
(com.vaadin.flow.component.Component component) Executes action logic.protected void
protected void
protected void
checkTargetItems
(Class<?> itemsType) protected void
protected void
onSelectionChange
(com.vaadin.flow.data.selection.SelectionEvent<?, E> event) void
setTarget
(ListDataComponent<E> target) withEnabled
(boolean enabled) Sets the enabled property value of an action.withEnabledByUiPermissions
(boolean enabledByUiPermissions) withHandler
(Consumer<ActionPerformedEvent> handler) Adds a listener to be notified when action is performed.withIcon
(com.vaadin.flow.component.icon.Icon icon) Sets the icon property value of an action.withIcon
(com.vaadin.flow.component.icon.VaadinIcon icon) Sets the icon property value of an action.withShortcutCombination
(KeyCombination shortcutCombination) Sets object that stores information about keys, modifiers and additional settings that describe shortcut combinations.withTarget
(ListDataComponent<E> target) Sets the text property value of an action.Sets the description property value of an action.withVariant
(ActionVariant actionVariant) Sets the variant property value of an action.withVisible
(boolean visible) Sets the visible property value of an action.withVisibleByUiPermissions
(boolean visibleByUiPermissions) Methods inherited from class io.jmix.flowui.action.SecuredBaseAction
addEnabledRule, isEnabledByRule, isEnabledByUiPermissions, isPermitted, isVisibleByUiPermissions, refreshState, removeEnabledRule, setEnabledByUiPermissions, setVisibleByUiPermissions
Methods inherited from class io.jmix.flowui.kit.action.BaseAction
addActionPerformedListener, isApplicable, setEnabled, setEnabledInternal, setVisible, setVisibleInternal, withDescription
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
addPropertyChangeListener, getDescription, getIcon, getId, getText, getVariant, isEnabled, isVisible, refreshState, setDescription, setEnabled, setIcon, setText, setVariant, setVisible
Methods inherited from interface io.jmix.flowui.action.ExecutableAction
execute
Methods inherited from interface io.jmix.flowui.kit.component.HasShortcutCombination
getShortcutCombination, setShortcutCombination
-
Field Details
-
target
-
selectionListenerRegistration
protected com.vaadin.flow.shared.Registration selectionListenerRegistration
-
-
Constructor Details
-
ListDataComponentAction
-
-
Method Details
-
initAction
protected void initAction() -
getTarget
- Specified by:
getTarget
in interfaceTargetAction<A extends ListDataComponentAction<A,
E>>
-
setTarget
- Specified by:
setTarget
in interfaceTargetAction<A extends ListDataComponentAction<A,
E>>
-
withTarget
-
withText
Description copied from class:BaseAction
Sets the text property value of an action. May be used by components to initialize their appearance.- Overrides:
withText
in classSecuredBaseAction
- Parameters:
text
- text to set ornull
to remove- Returns:
- this object
-
withEnabled
Description copied from class:BaseAction
Sets the enabled property value of an action. May be used by components to initialize their appearance.- Overrides:
withEnabled
in classSecuredBaseAction
- Parameters:
enabled
- whether the action is currently enabled- Returns:
- this object
-
withVisible
Description copied from class:BaseAction
Sets the visible property value of an action. May be used by components to initialize their appearance.- Overrides:
withVisible
in classSecuredBaseAction
- Parameters:
visible
- whether the action is currently visible- Returns:
- this object
-
withIcon
Description copied from class:BaseAction
Sets the icon property value of an action. May be used by components to initialize their appearance.- Overrides:
withIcon
in classSecuredBaseAction
- Parameters:
icon
- icon to set ornull
to remove- Returns:
- this object
-
withIcon
Description copied from class:BaseAction
Sets the icon property value of an action. May be used by components to initialize their appearance.- Overrides:
withIcon
in classSecuredBaseAction
- Parameters:
icon
- icon to set ornull
to remove- Returns:
- this object
-
withTitle
Description copied from class:BaseAction
Sets the description property value of an action. May be used by components to initialize their appearance.- Overrides:
withTitle
in classSecuredBaseAction
- Parameters:
title
- description to set ornull
to remove- Returns:
- this object
-
withVariant
Description copied from class:BaseAction
Sets the variant property value of an action. May be used by components to initialize their appearance.- Overrides:
withVariant
in classSecuredBaseAction
- Parameters:
actionVariant
- variant to set- Returns:
- this object
-
withShortcutCombination
Description copied from class:BaseAction
Sets object that stores information about keys, modifiers and additional settings that describe shortcut combinations.- Overrides:
withShortcutCombination
in classSecuredBaseAction
- Parameters:
shortcutCombination
- key combination to set ornull
to remove- Returns:
- this object
-
withHandler
Description copied from class:BaseAction
Adds a listener to be notified when action is performed.- Overrides:
withHandler
in classSecuredBaseAction
- Parameters:
handler
- listener to add ornull
to remove all- Returns:
- this object
-
withEnabledByUiPermissions
- Overrides:
withEnabledByUiPermissions
in classSecuredBaseAction
-
withVisibleByUiPermissions
- Overrides:
withVisibleByUiPermissions
in classSecuredBaseAction
-
attachSelectionListener
protected void attachSelectionListener() -
onSelectionChange
-
actionPerform
public void actionPerform(com.vaadin.flow.component.Component component) Description copied from interface:Action
Executes action logic.- Specified by:
actionPerform
in interfaceAction
- Overrides:
actionPerform
in classBaseAction
- Parameters:
component
-Component
that triggered this action
-
checkTarget
protected void checkTarget() -
checkTargetItems
-