com.ibm.mashups.builder.model
Interface ContextMenuItem


public ContextMenuItem

Defines the format for context menu items using simple object notation. Items in this format can be simple objects and are not restricted to instances of an interface, but must support these properties.
{
    isSeparator: true/false, whether this item is a menu separator,
    iconClass: icon class name for menu item,
    description: item description,
    title: menu item title,
    localized: com.ibm.mashups.enabler.Localized,contains titles and descriptions for all supported locales,
    enabled: true/false, whether this item is enabled,
    id: the id if listed, the id if listed, otherwise, null,
    ordinal: this could be null, which means it wasn't provided in the data, so should add it to the end of the context menu,
    actionCallBackFunction: actionFnDefinedByMenuItem() { }
        By default the actionCallBackFunction is a zero-argument function, however, extensions may define other semantics that are used by context menu consumers that pass arguments.
}

Any other properties may be added as extensions to be used by a context menu consumer.
It should not be expected that changes to any properties on an underlying context menu item that is returned by a context menu loader will be surfaced in the user interface without first calling the context menu loader's onChange function.


Field Summary
 Boolean isSeparator
           Indicates whether or not this item is actually a separator between other items.
 String iconClass
           A CSS class specified for this item.
 String description
           The description of the context menu item.
 String title
           The title of the context menu item.
 Localized localized
           Localized object that provides access to a localized title and description for this item.
 Boolean enabled
           Indicates whether or not this item is enabled.
 String id
           The String identifier of the context menu item.
 Number ordinal
           Specifies the relative order in which this item appears in its context menu loader.
 Function actionCallBackFunction
           The function to execute for this context menu item.
 unknown actionCallBackFunctionName
           
 

Field Detail

isSeparator

Boolean isSeparator
Indicates whether or not this item is actually a separator between other items. Typically, separator items do not contain many, if any, other properties at all, although extensions may define other semantics.


iconClass

String iconClass
A CSS class specified for this item.


description

String description
The description of the context menu item. Defaults to the localized object's description if this is empty or null.


title

String title
The title of the context menu item. Defaults to the localized object's title if this is empty or null.


localized

Localized localized
Localized object that provides access to a localized title and description for this item.


enabled

Boolean enabled
Indicates whether or not this item is enabled.


id

String id
The String identifier of the context menu item.


ordinal

Number ordinal
Specifies the relative order in which this item appears in its context menu loader.


actionCallBackFunction

Function actionCallBackFunction
The function to execute for this context menu item. Execution time is dependent on the context menu consumer and is not defined by the API or necessarily limited to selecting or clicking an element in a user interface.
By default the actionCallBackFunction is a zero-argument function, however, extensions may define other semantics that are used by context menu consumers that pass arguments.


actionCallBackFunctionName

unknown actionCallBackFunctionName


Copyright IBM Corp. 2010 All Rights Reserved.