Packagecom.vmware.actionsfw.events
Classpublic class ContextMenuRequestEvent
InheritanceContextMenuRequestEvent Inheritance flash.events.Event

Use this event to request that a context menu for the given action context, should be displayed.

The action framework will display a context menu that includes all actions relevant to the specified context. These actions are grouped into sub-menus by ActionSpec.groupId and ActionSpec.category. Use propreties defined on this event to control how the menu is presented. Unavailable actions are included as well as available actions.

For multi-target context's, the availability calculations of the actions are defered 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.

See also

com.vmware.actionsfw.ActionSpec
com.vmware.actionsfw.ActionContext


Public Properties
 PropertyDefined By
  context : ActionContext = null
The context against which to evaluate Actions.
ContextMenuRequestEvent
  contextItem : UIComponent = null
Optional UIComponent for displaying a selection context on the item associated with the menu.
ContextMenuRequestEvent
  flattenCategories : Boolean = true
Controls whether the categories sub-menu is flattened or is divided further into sub-menus.
ContextMenuRequestEvent
  following : Array = null
An optional Array of top level IActions which should appear last.
ContextMenuRequestEvent
  menuId : String = afContextMenu
The value to set the menu's id property to.
ContextMenuRequestEvent
  preceding : Array = null
An optional Array of top level IActions which should appear first.
ContextMenuRequestEvent
  showGroupsMenu : Boolean = true
Controls whether the context menu has a top-level groups sub-menu.
ContextMenuRequestEvent
  showTitle : Boolean = true
Controls whether the context menu has a title.
ContextMenuRequestEvent
  stageX : Number
The x coordinate for the origin of the menu.
ContextMenuRequestEvent
  stageY : Number
The y coordinate for the origin of the menu.
ContextMenuRequestEvent
  titleIcon : Class
Set this property to define a custom icon for the menu.
ContextMenuRequestEvent
  titleLabel : String
Set this property to define a custom title for the menu.
ContextMenuRequestEvent
Public Methods
 MethodDefined By
  
ContextMenuRequestEvent(stageX:Number, stageY:Number, context:ActionContext, contextItem:UIComponent = null, showTitle:Boolean = true, showGroupsMenu:Boolean = true, flattenCategories:Boolean = true, preceding:Array = null, following:Array = null)
ContextMenuRequestEvent
  
clone():Event
[override]
ContextMenuRequestEvent
Public Constants
 ConstantDefined By
  DEFAULT_MENU_ID : String = afContextMenu
[static]
ContextMenuRequestEvent
  REQUEST : String = afContextMenuRequest
[static]
ContextMenuRequestEvent
Property Detail
contextproperty
public var context:ActionContext = null

The context against which to evaluate Actions.

Must not be null.

contextItemproperty 
public var contextItem:UIComponent = null

Optional UIComponent for displaying a selection context on the item associated with the menu.

flattenCategoriesproperty 
public var flattenCategories:Boolean = true

Controls whether the categories sub-menu is flattened or is divided further into sub-menus.

The default value is true.

followingproperty 
public var following:Array = null

An optional Array of top level IActions which should appear last.

menuIdproperty 
public var menuId:String = afContextMenu

The value to set the menu's id property to.

precedingproperty 
public var preceding:Array = null

An optional Array of top level IActions which should appear first.

showGroupsMenuproperty 
public var showGroupsMenu:Boolean = true

Controls whether the context menu has a top-level groups sub-menu.

If false, the top level sub-menu is the categories sub-menu.

The default value is true.

showTitleproperty 
public var showTitle:Boolean = true

Controls whether the context menu has a title.

The default title displayed depends upon whether the object types in the context are all of one known managed object type. If so, then the title takes the form "[type_icon] Actions: [context.length] [object_type_name]". Else, the title defaults to the more generic "Actions: [context.length] Objects".

The default label and icon can be overriden using the titleLabel and titleIcon properties.

The default value is true.

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 define a custom icon for the menu.

Has no effect if showTitle is false.

Set to null to get the default title icon, if available.

The default value is null.

titleLabelproperty 
public var titleLabel:String

Set this property to define a custom title for the menu.

Has no effect if showTitle is false.

Set to null to get the default title label.

The default value is null.

Constructor Detail
ContextMenuRequestEvent()Constructor
public function ContextMenuRequestEvent(stageX:Number, stageY:Number, context:ActionContext, contextItem:UIComponent = null, showTitle:Boolean = true, showGroupsMenu:Boolean = true, flattenCategories:Boolean = true, preceding:Array = null, following:Array = null)

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 Actions. Must not be null.
 
contextItem:UIComponent (default = null) — Optional UIComponent for displaying a selection context on the item associated with the menu.
 
showTitle:Boolean (default = true) — Controls whether the context menu has a title.
 
showGroupsMenu:Boolean (default = true) — Controls whether the context menu has a top-level groups sub-menu.
 
flattenCategories:Boolean (default = true) — Controls whether the categories sub-menu is flattened or is divided further into sub-menus.
 
preceding:Array (default = null) — An optional Array of top level IActions which should precede the categorized actions that the action framework provides.
 
following:Array (default = null) — An optional Array of top level IActions which should follow the categorized actions that the action framework provides.
Method Detail
clone()method
override public function clone():Event

Returns
Event
Constant Detail
DEFAULT_MENU_IDConstant
public static const DEFAULT_MENU_ID:String = afContextMenu

REQUESTConstant 
public static const REQUEST:String = afContextMenuRequest