Tag name: <amc:subMenu>

The SubMenu 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.
Note: SubMenus are ignored on BlackBerry.

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

WM SubMenu2 screenshot
Four SubMenu components and one commandMenuItem component inside of an amc:menu component running on Windows Mobile.

<amc:menu type="main" id="m1">
    <amc:menuGroup id="g1">
      <amc:subMenu label="Edit" id="sm1">
        <amc:menuGroup id="g2">	  
          <amc:commandMenuItem label="Copy" id="cm1" />
          <amc:commandMenuItem label="Paste" id="cm2" />
        </amc:menuGroup>
      </amc:subMenu>
    </amc:menuGroup>
  </amc:menu>

Attributes

Name Type Supports EL? Description
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).