Package | com.vmware.actionsfw |
Class | public class ActionSpec |
Inheritance | ActionSpec ![]() |
Implements | mx.core.IUID |
ActionSpec
objects can be supplied to the action framework in sets
by extending the vise.actions.sets
extension point with an
ActionSetSpec
object and supplying an array of ActionSpec
objects to the actions
property (see example below).
See also
Property | Defined By | ||
---|---|---|---|
acceptsMultipleTargets : Boolean
(Optional) When true, the action is considered relevant for target contexts
that contain more than one object. | ActionSpec | ||
command : ObjectSpec
Specifies the class that handles the ActionInvocationEvent that represents (the
invocation of) this action. | ActionSpec | ||
conditionalProperty : String
(Optional) The name of a boolean property that indicates whether this action is applicable
or should be enabled on the object in question. | ActionSpec | ||
description : String
(Optional) The longer description of the action, suitable for a tooltip. | ActionSpec | ||
icon : Class
(Optional) The icon to use for this action in UIs that display icons. | ActionSpec | ||
label : String
The readable short name of the action, suitable for use on a button or in a menu. | ActionSpec | ||
privateAction : Boolean
(Optional) Flag indicating that this action should not be used by the Action Framework
except when explicitly identified by its uid. | ActionSpec | ||
uid : String
Unique id of the action, in namespace style, e.g. | ActionSpec |
acceptsMultipleTargets | property |
public var acceptsMultipleTargets:Boolean
(Optional) When true
, the action is considered relevant for target contexts
that contain more than one object.
The default value is false
.
command | property |
public var command:ObjectSpec
Specifies the class that handles the ActionInvocationEvent that represents (the invocation of) this action.
Handling is done via a method annotated with the [RequestHandler] tag which contains the actionSpec's uid as follows:
[RequestHandler("com.vmware.samples.actions.myVmAction1")] public function onVmAction1Invocation(event:ActionInvocationEvent):void { ... }
conditionalProperty | property |
public var conditionalProperty:String
(Optional) The name of a boolean property that indicates whether this action is applicable or should be enabled on the object in question. In other words, the current value of the property on a given object indicates the current availability of the action on that object.
description | property |
public var description:String
(Optional) The longer description of the action, suitable for a tooltip.
icon | property |
public var icon:Class
(Optional) The icon to use for this action in UIs that display icons.
label | property |
public var label:String
The readable short name of the action, suitable for use on a button or in a menu.
privateAction | property |
public var privateAction:Boolean
(Optional) Flag indicating that this action should not be used by the Action Framework
except when explicitly identified by its uid
. In practice, set it to true
when you define a "context-less" action, for instance a global action in a list toolbar
or a drag and drop action that you don't want to see in the default menu.
The default value is false
.
uid | property |
uid:String
Unique id of the action, in namespace style, e.g. com.acme.actions.vm.vmAction1. The uid is used in the command class [RequestHandler] tag which annotates the method handling this action.
public function get uid():String
public function set uid(value:String):void
<!-- action set for VMs --> <extension id="com.acme.actions.vm.vmActionSet"/> <extendedPoint>vise.actions.sets</extendedPoint> <object> <actions> <!-- action 1 --> <com.vmware.actionsfw.ActionSpec> <uid>com.acme.actions.vm.vmAction1</uid> <label>action label 1</label> <description>This will perform action 1 on the virtual machine</description> <icon>Embed("../assets/vmAction1Icon.png")</icon> <!-- This action requires that the "config.template" property be true on the ActionContext objects --> <conditionalProperty>config.template</conditionalProperty> <!-- The command class that handles ActionInvocationEvents for this action --> <operationId>vmAction1CommandClass</operationId> <acceptsMultipleTargets>true</acceptsMultipleTargets> </com.vmware.actionsfw.ActionSpec> </actions> </object> <metadata> <objectType>VirtualMachine</objectType> </metadata> </extension>