| Package | com.vmware.actionsfw.events |
| Class | public class ContextMenuRequestEvent |
| Inheritance | ContextMenuRequestEvent flash.events.Event |
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
| Property | Defined 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 | ||
| Method | Defined 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 | ||
| Constant | Defined By | ||
|---|---|---|---|
| DEFAULT_MENU_ID : String = afContextMenu [static] | ContextMenuRequestEvent | ||
| REQUEST : String = afContextMenuRequest [static] | ContextMenuRequestEvent | ||
| context | property |
public var context:ActionContext = nullThe context against which to evaluate Actions.
Must not be null.
| contextItem | property |
public var contextItem:UIComponent = null
Optional UIComponent for displaying a selection context on the item
associated with the menu.
| flattenCategories | property |
public var flattenCategories:Boolean = trueControls whether the categories sub-menu is flattened or is divided further into sub-menus.
The default value is true.
| following | property |
public var following:Array = null
An optional Array of top level IActions which should
appear last.
| menuId | property |
public var menuId:String = afContextMenu
The value to set the menu's id property to.
| preceding | property |
public var preceding:Array = null
An optional Array of top level IActions which should
appear first.
| showGroupsMenu | property |
public var showGroupsMenu:Boolean = trueControls 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.
| showTitle | property |
public var showTitle:Boolean = trueControls 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.
| stageX | property |
public var stageX:NumberThe x coordinate for the origin of the menu.
| stageY | property |
public var stageY:NumberThe y coordinate for the origin of the menu.
| titleIcon | property |
public var titleIcon:ClassSet 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.
| titleLabel | property |
public var titleLabel:StringSet 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.
| 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.
|
| clone | () | method |
override public function clone():EventReturns
Event |
| DEFAULT_MENU_ID | Constant |
public static const DEFAULT_MENU_ID:String = afContextMenu| REQUEST | Constant |
public static const REQUEST:String = afContextMenuRequest