The base class for Actions.
public abstract class ActionBase : Component, ISupportUpdate, ISupportClientScripts
Public MustInherit Class ActionBase Inherits Component Implements ISupportUpdate, ISupportClientScripts
Actions are abstract UI elements that allow you to perform specific operations in response to an end-user's manipulations (see the SimpleAction.Execute event definition). Actions are contained within Controllers in their Controller.Actions lists. An Action's presence in a particular Window (Frame) depends on whether the corresponding Controller is active in it. Note that you can also specify the availability context for individual Actions via their properties.
The ActionBase class is the base class for all Action types. This class provides events, properties and methods that support the common Action behavior. They are:
- The ActionBase.Executing and ActionBase.Executed events are used to execute custom code before and after executing an Action.
- The ActionBase.Controller property provides access to the parent Controller.
- The ActionBase.Active and ActionBase.Changed members provide the Action activation mechanism.
- The ActionBase.TargetObjectType, ActionBase.TargetViewId, ActionBase.TargetViewNesting ActionBase.TargetViewType, ActionBase.TargetObjectsCriteria, ActionBase.TargetObjectsCriteriaMode and ActionBase.SelectionDependencyType properties specify conditions for Action activation (these conditions are checked only for Actions from View Controllers).
- The ActionBase.Enabled and ActionBase.Changed members represent mechanisms for making an Action enabled/disabled.
The eXpressApp Framework supplies several Action types derived from the Action class: SimpleAction, ParametrizedAction, PopupWindowShowAction, SingleChoiceAction and ActionUrl. Each of these types has a different purpose. For details, see the descriptions of these classes and the Actions topic.
To add an Action to a Controller, use the Controller's Designer (see the Extend Functionality section in the Tutorial). Information specified for an Action in the Controller's Designer or the Controller's constructor in code is loaded to the Application Model. You can view all the Actions that will be created in your application. To do this, invoke the Model Editor and navigate to the ActionDesign | Actions node. Information on Actions is represented by properties of the Action child nodes. These properties can be initially set to default values or the values that you specified in the Controller's constructor or in the Controller's Designer. You can modify these values if the properties are not read-only.
Actions of the SimpleAction and PopupWindowShowAction types can be also added via the ActionAttribute attribute. Refer to the How to: Create an Action Using the Action Attribute topic to see an example.
In this documentation, built-in Actions are referred by their identifiers specified by ActionBase.Id property. To find out what caption is assigned to a particular Action, use the Model Editor.