Tag name: <amc:menuControl>
Component type: Menu Control

A menuControl associates its parent component to a menu in the same view. Ordinarily it is used to associate the main menu with the form, but it can also be used to associate a menu with individual components. When such a component has focus, the associated menu is included with the main menu.

<amc:view>
  <amc:form id="form0">
    <amc:menuControl refId="menu0"/>
    <amc:panelGroupLayout id="panelGroupLayout1">
      <amc:commandButton text="This button has a menu." id="commandButton1">
        <amc:menuControl refId="menu1"/>
      </amc:commandButton>
    </amc:panelGroupLayout>
  </amc:form>
  <amc:menu type="main" id="menu0">
    <amc:menuGroup id="menuGroup1">
      <amc:commandMenuItem id="commandMenuItem1" label="Main Menu Item"/>
    </amc:menuGroup>
  </amc:menu>
  <amc:menu id="menu1">
    <amc:menuGroup id="menuGroup2">
      <amc:commandMenuItem id="commandMenuItem2" label="Button Menu Item"/>
    </amc:menuGroup>
  </amc:menu>
</amc:view>

Attributes

Name Type Supports EL? Description
refId String No Defines the unique identifier of the menu that should appear when the parent component has focus. If more menus are created and need to be displayed, Menu Control components need to be added to the Form or individual components to define when the menu should be displayed.