Packagecom.vmware.actionsfw.events
Classpublic class ActionsMenuRequestEvent
InheritanceActionsMenuRequestEvent Inheritance flash.events.Event

Use this event to request that an actions menu for the given ActionContext be displayed.

The action framework will display a menu that includes all actions relevant to the specified context. Unavailable actions are included as well as available actions (unavailable actions are disabled).

For multi-target context's, the availability calculations of the actions are deferred until an action is actually selected by the user. At that time, the user will typically receive a confirmation message detailing which of the selected objects that action is available on. Until then, all actions in the menu are presented as available.

View the examples

See also

com.vmware.actionsfw.ActionContext


Public Properties
 PropertyDefined By
  context : ActionContext = null
The context against which to evaluate and invoke actions.
ActionsMenuRequestEvent
  stageX : Number
The x coordinate for the origin of the menu.
ActionsMenuRequestEvent
  stageY : Number
The y coordinate for the origin of the menu.
ActionsMenuRequestEvent
  titleIcon : Class
Set this property to show a title containing the given icon.
ActionsMenuRequestEvent
  titleLabel : String
Set this property to show a title containing the given label.
ActionsMenuRequestEvent
Public Methods
 MethodDefined By
  
ActionsMenuRequestEvent(stageX:Number, stageY:Number, context:ActionContext)
ActionsMenuRequestEvent
  
clone():Event
[override]
ActionsMenuRequestEvent
Public Constants
 ConstantDefined By
  REQUEST : String = afActionsMenuRequest
[static]
ActionsMenuRequestEvent
Property Detail
contextproperty
public var context:ActionContext = null

The context against which to evaluate and invoke actions.

Must not be null.

stageXproperty 
public var stageX:Number

The x coordinate for the origin of the menu.

stageYproperty 
public var stageY:Number

The y coordinate for the origin of the menu.

titleIconproperty 
public var titleIcon:Class

Set this property to show a title containing the given icon.

The default value is null.

titleLabelproperty 
public var titleLabel:String

Set this property to show a title containing the given label.

The default value is null.

Constructor Detail
ActionsMenuRequestEvent()Constructor
public function ActionsMenuRequestEvent(stageX:Number, stageY:Number, context:ActionContext)

Parameters
stageX:Number — The x-coordinate for the origin of the menu.
 
stageY:Number — The y-coordinate for the origin of the menu.
 
context:ActionContext — The context against which to evaluate and invoke actions. Must not be null.
Method Detail
clone()method
override public function clone():Event

Returns
Event
Constant Detail
REQUESTConstant
public static const REQUEST:String = afActionsMenuRequest

Examples
The following code would show a menu at the given global x and y positions for the given object.

var contextObject:IResourceReference = someData.resRef;
var actionContext:ActionContext = new ActionContext([contextObject]);
var menuRequest:ActionsMenuRequest = new ActionsMenuRequest(10, 10, actionContext);
menuRequest.titleLabel = "Actions for my object";
menuRequest.titleIcon = myObjectIcon;
dispatchEvent(menuRequest);