Action is an interface that abstracts an action (in other words, some function) from a visual component. It is particularly useful when the same action can be invoked from different visual components (for example, from button and table context menu).
Action also defines some common properties, such as caption, keyboard shortcuts, flags of accessibility and visibility, etc.
Visual components associated with an action can be of two types:
Visual components with a single action implement the
ActionOwnerinterface. These are Button and
An action is linked to the component by invoking the
ActionsHolder.addAction()method is used to add actions to the component. Implementation of this method in the component checks whether it already contains an action with the same identifier. If yes, then the existing action will be replaced with the new one. Therefore, it is possible, for example, to declare a standard action in a screen descriptor and then create a new one in the controller with different properties and add it to the component.