Packagecom.vmware.actionsfw
Classpublic class ActionMenuItemSpec
InheritanceActionMenuItemSpec Inheritance Object

An array of ActionMenuItemSpec allows to define a custom menu layout of actions. See extension point vsphere.core.menus.solutionMenus

View the examples



Public Properties
 PropertyDefined By
  children : Array
An Array of this menu item's child menu items, if it has any.
ActionMenuItemSpec
  icon : Class
The icon to show on this menu item.
ActionMenuItemSpec
  label : String
The text to show on this menu item.
ActionMenuItemSpec
  type : String
Specifies the type of this menu item.
ActionMenuItemSpec
  uid : String
Unique identifier for this action menu item.
ActionMenuItemSpec
Property Detail
childrenproperty
public var children:Array

An Array of this menu item's child menu items, if it has any.

iconproperty 
icon:Class

The icon to show on this menu item.


Implementation
    public function get icon():Class
    public function set icon(value:Class):void
labelproperty 
label:String

The text to show on this menu item.


Implementation
    public function get label():String
    public function set label(value:String):void
typeproperty 
public var type:String

Specifies the type of this menu item.

Meaningful values are action, separator. It is not necessary to specify a value for type when defining a sub menu

action specifies the unique identifier of an action to appear at the corresponding location in the data provider.

separator specifies that a separator should be shown at the corresponding position in the data provider.

uidproperty 
public var uid:String

Unique identifier for this action menu item.

If the type of this item is action, the uid should be set to the uid of an action, as indicated by its ActionSpec. The menu will attempt to substitute this menu item with that action.

Examples
The following plugin manifest code declares a custom menu for Virtual Machines containing 3 actions: the first 2 are in a Configuration submenu. The last one appears after a separator.
 
   <!-- Custom Sample action Sub menu -->
 
   <extension id="com.vmware.samples.actions.submenus">
      <extendedPoint>vsphere.core.menus.solutionMenus</extendedPoint>
      <object>
        <label>All Sample Actions</label>
        <uid>sample</uid>
        <children>
          <Array>
              <com.vmware.actionsfw.ActionMenuItemSpec>
                 <uid>configuration</uid>
                 <label>Configuration</label>
                 <children>
                   <Array>
                      <com.vmware.actionsfw.ActionMenuItemSpec>
                         <type>action</type>
                         <uid>com.vmware.samples.actions.myVmAction1</uid>
                         <label>Show Selected VM</label>
                      </com.vmware.actionsfw.ActionMenuItemSpec>
                      <com.vmware.actionsfw.ActionMenuItemSpec>
                         <type>action</type>
                         <uid>com.vmware.samples.actions.myVmAction2</uid>
                         <label>Call Service</label>
                      </com.vmware.actionsfw.ActionMenuItemSpec>
                   </Array>
                 </children>
             </com.vmware.actionsfw.ActionMenuItemSpec>
 
             <com.vmware.actionsfw.ActionMenuItemSpec>
                <!-- adds a separator line between menus items.-->
                <type>separator</type>
             </com.vmware.actionsfw.ActionMenuItemSpec>
 
             <com.vmware.actionsfw.ActionMenuItemSpec>
                <type>action</type>
                <uid>com.vmware.samples.actions.myVmAction3</uid>
                <label>Action for template VM only</label>
             </com.vmware.actionsfw.ActionMenuItemSpec>
          </Array>
       </children>
    </object>
 
    <metadata>
       <objectType>VirtualMachine</objectType>
    </metadata>
 </extension>