Package io.jmix.flowui.kit.action
Interface Action
- All Superinterfaces:
 HasShortcutCombination
- All Known Subinterfaces:
 ExecutableAction,OperationResultAction,SecuredAction,SecurityConstraintAction,TargetAction<C>,ViewOpeningAction
- All Known Implementing Classes:
 AbstractAction,AbstractGenericFilterSaveAction,AddAction,AssignToUsersAction,BaseAction,BulkEditAction,ChangePasswordAction,CreateAction,CreateNotificationAction,DateIntervalAction,DaysOfWeekEditAction,DetailCloseAction,DetailDiscardAction,DetailEnableEditingAction,DetailSaveAction,DetailSaveCloseAction,DialogAction,EditAction,EntityClearAction,EntityInspectorAddAction,EntityInspectorCreateAction,EntityInspectorEditAction,EntityInspectorListView.ExportAction,EntityInspectorLookupAction,EntityLookupAction,EntityOpenAction,EntityOpenCompositionAction,ExcelExportAction,ExcludeAction,ExportAction,FragmentAction,GenericFilterAction,GenericFilterAddConditionAction,GenericFilterClearValuesAction,GenericFilterCopyAction,GenericFilterEditAction,GenericFilterMakeDefaultAction,GenericFilterRemoveAction,GenericFilterResetAction,GenericFilterSaveAction,GenericFilterSaveAsAction,GenericFilterSaveWithValuesAction,InputDialogAction,ItemTrackingAction,JsonExportAction,ListDataComponentAction,LogicalFilterEditAction,LogoutAction,LookupDiscardAction,LookupSelectAction,MultiValueSelectAction,OperationResultViewAction,PickerAction,PropertyFilter.OperationChangeAction,ReadAction,RefreshAction,RemoveAction,ResetPasswordAction,RunListEntityReportAction,RunReportAction,RunSingleEntityReportAction,SecuredBaseAction,SecuredListDataComponentAction,ShowEntityInfoAction,ShowExecutionReportHistoryAction,ShowPivotTableAction,ShowRoleAssignmentsAction,ShowUserSubstitutionsAction,SubstituteUserAction,ValueClearAction,ViewAction,ViewCloseAction
The 
Action interface abstracts away a function from a visual component.
 
 The action is executed by invoking its actionPerform(Component) method.
 
The action itself has no visual representations, but visual components may use its properties to initialize their appearance.
- 
Field Summary
Fields - 
Method Summary
Modifier and TypeMethodDescriptionvoidactionPerform(com.vaadin.flow.component.Component component) Executes action logic.com.vaadin.flow.shared.RegistrationaddPropertyChangeListener(Consumer<PropertyChangeEvent> listener) Adds a listener to be notified about changes in the properties of the action.Returns the description property value of an action.com.vaadin.flow.component.icon.IcongetIcon()Returns the icon property value of an action.getId()getText()Returns the text property value of an action.Returns the variant property value of an action.booleanReturns the enabled property value of an action.booleanReturns the visible property value of an action.voidRefreshes internal state of the action to initialize enabled, visible, text, icon, etc.voidsetDescription(String description) Sets the description property value of an action.voidsetEnabled(boolean enabled) Sets the enabled property value of an action.voidsetIcon(com.vaadin.flow.component.icon.Icon icon) Sets the icon property value of an action.voidSets the text property value of an action.voidsetVariant(ActionVariant variant) Sets the variant property value of an action.voidsetVisible(boolean visible) Sets the visible property value of an action.Methods inherited from interface io.jmix.flowui.kit.component.HasShortcutCombination
getShortcutCombination, setShortcutCombination 
- 
Field Details
- 
PROP_TEXT
- See Also:
 
 - 
PROP_ENABLED
- See Also:
 
 - 
PROP_VISIBLE
- See Also:
 
 - 
PROP_ICON
- See Also:
 
 - 
PROP_DESCRIPTION
- See Also:
 
 - 
PROP_VARIANT
- See Also:
 
 - 
PROP_SHORTCUT_COMBINATION
- See Also:
 
 
 - 
 - 
Method Details
- 
getId
String getId()- Returns:
 - action's identifier
 
 - 
getText
Returns the text property value of an action. May be used by components to initialize their appearance.- Returns:
 - action's text or 
nullif not set 
 - 
setText
Sets the text property value of an action. May be used by components to initialize their appearance.- Parameters:
 text- text to set ornullto remove
 - 
isEnabled
boolean isEnabled()Returns the enabled property value of an action. May be used by components to initialize their appearance.- Returns:
 - whether the action is currently enabled
 
 - 
setEnabled
void setEnabled(boolean enabled) Sets the enabled property value of an action. May be used by components to initialize their appearance.- Parameters:
 enabled- whether the action is currently enabled
 - 
isVisible
boolean isVisible()Returns the visible property value of an action. May be used by components to initialize their appearance.- Returns:
 - whether the action is currently visible
 
 - 
setVisible
void setVisible(boolean visible) Sets the visible property value of an action. May be used by components to initialize their appearance.- Parameters:
 visible- whether the action is currently visible
 - 
getIcon
@Nullable com.vaadin.flow.component.icon.Icon getIcon()Returns the icon property value of an action. May be used by components to initialize their appearance.- Returns:
 - action's icon or 
nullif not set 
 - 
setIcon
void setIcon(@Nullable com.vaadin.flow.component.icon.Icon icon) Sets the icon property value of an action. May be used by components to initialize their appearance.- Parameters:
 icon- icon to set ornullto remove
 - 
getDescription
Returns the description property value of an action. May be used by components to initialize their appearance.- Returns:
 - action's description or 
nullif not set 
 - 
setDescription
Sets the description property value of an action. May be used by components to initialize their appearance.- Parameters:
 description- description to set ornullto remove
 - 
getVariant
ActionVariant getVariant()Returns the variant property value of an action. May be used by components to initialize their appearance.- Returns:
 - action's variant
 
 - 
setVariant
Sets the variant property value of an action. May be used by components to initialize their appearance.- Parameters:
 variant- variant to set
 - 
refreshState
void refreshState()Refreshes internal state of the action to initialize enabled, visible, text, icon, etc. properties depending on programmatically set values and user permissions set at runtime.For example, this method is called by visual components holding actions when they are bound to data. At this moment the action can find out what entity it is connected to and change its state according to the user permissions.
 - 
actionPerform
void actionPerform(com.vaadin.flow.component.Component component) Executes action logic.- Parameters:
 component-Componentthat triggered this action
 - 
addPropertyChangeListener
com.vaadin.flow.shared.Registration addPropertyChangeListener(Consumer<PropertyChangeEvent> listener) Adds a listener to be notified about changes in the properties of the action.- Parameters:
 listener- listener to add- Returns:
 - a registration object for removing an event listener
 
 
 -