Tag name: <amc:commandMenuItem>

The CommandMenuItem component creates a menu item in a menu or on a subMenu. It is required to be used inside a menuGroup and cannot be used on its own.

WM CommandMenuItem screenshot
Four CommandMenuItem components inside of an amc:menu component running on Windows Mobile.

BB CommandMenuItem screenshot
Four CommandMenuItem components inside of an amc:menu component running on BlackBerry.

<amc:menu type="main" id="m1">
    <amc:menuGroup id="g1">
      <amc:commandMenuItem label="Open" id="cm1"/>
    </amc:menuGroup>
  </amc:menu>

Attributes

Name Type Supports EL? Description
action String Yes Defines a reference to an action method sent by the command component, or the static outcome of an action.
actionListener oracle.adfnmc.el.MethodExpression Only EL Defines a method reference to an action listener.
disabled boolean Yes Specifies whether or not this component should be displayed as active (enabled) or inactive (disabled). The default value is false. Note: this attribute is only supported on Windows Mobile platform.
id String No Specifies the identifier for the component. The identifier must follow the following rules:
  • Must not be a zero-length String.
  • First character must be an ASCII letter (A-Za-z) or an underscore ('_').
  • Subsequent characters must be an ASCII letter or digit (A-Za-z0-9), an underscore ('_'), or a dash ('-').
index int Yes Defines the order of items within a group if multiple Sub Menus and/or Menu Items appear. Lower values appear above higher values. If this attribute is not specified, the Sub Menu and/or Menu Item will be displayed in the order in which they appear in the MCX file.
label String Yes Defines the label of the component.
platform String Yes Specifies the client platform on which this component will appear. Valid values:
  • All (default): the component is rendered on all platforms.
  • Windows Mobile: the component is rendered on Windows Mobile only.
  • BlackBerry: the component is rendered on BlackBerry only.
If the platform is set to "All", Menu Group and Menu Item components that reside inside this menu can have their platform attributes selectively set to "Windows Mobile" or "BlackBerry" to enable their display in either platform.

Note: because Sub Menu is not supported on BlackBerry smartphones, this attribute will be ignored even if it is set to "BlackBerry".
rendered boolean Yes Specifies whether or not the component is rendered. When set to false, no output will be delivered for this component (the component will not in any way be rendered, and cannot be made visible).
selected boolean Yes Defines whether or not this Menu Item should appear selected when the menu is displayed. The default value is false.

Note: this attribute is only supported on Windows Mobile platform.
weight int Yes Allows an integer value to be added to each Menu Item to define which Menu Item will be the default when a menu is displayed. The default value is 1000.

Note: this attribute is only supported on BlackBerry platform.