Show TOC

Procedure documentationCreating a Context Menu Locate this document in the navigation structure

 

You can use context menus to provide the user with shortcuts to actions or activities that are relevant to the object the user has selected at runtime.

Procedure

Context menus are configured in the FPM configuration editor, FLUID.

There are three parts to creating such a menu type in an application:

  1. Create a context menu and add and configure menu items to it.

  2. Assign the context menu to an element in the GUIBB or to the GUIBB as a whole.

  3. Display the menu as a context menu or, alternatively, as an action menu.

Creating a Context Menu and Adding and Configuring Menu Items to It
  1. Run the application and choose Show Customizable Areas to highlight the individual GUIBBs in the application.

  2. Choose the GUIBB (for example, a list or form component) to which you want to add a context menu.

  3. Create a new Customizing for the application if none exists.

    The FPM configuration editor, FLUID, opens.

  4. Choose the Menu Schema panel.

  5. Choose Add Menu in the Menu Schema toolbar.

  6. In the Attributes panel, enter a Context Menu ID.

    It is useful to provide an explanatory name for your context menu.

  7. Choose Add Menu Item in the Menu Schema toolbar.

  8. In the Standard Attributes section of the Attributes panel, choose one of the following Item Types and enter the attributes described below each type:

    • Single Action

      In the Action Assignment section of the Attributes panel, enter an FPM Event ID and the Menu Item Text.

    • Menu Checkbox

      In the Action Assignment section of the Attributes panel, enter an FPM Event ID and the Menu Item Text.

    • Submenu

      In the Standard Attributes section of the Attributes panel, enter text for the label of the submenu and the Context Menu ID of the context menu which should appear as the submenu at runtime.

    You have now created a context menu.

  9. (Optional) You can also complete the following fields if available:

    • Image

    • Separator Bar

    • Needs More Information

Displaying the Context Menu

You have now created your context menu. You can assign it to an element in the component, or to the component as a whole. To do this, do one of the following:

  • Assigning a Context Menu to an Element

    Choose the <GUIBB> Schema panel and choose an element inside the panel. In the Standard Attributes section of the Attributes panel, enter the Context Menu ID of the context menu you have just created. Save and test your application. The context menu appears only for the element you chose; it does not appear when you choose the secondary mouse button anywhere else on the screen.

  • Assigning a Context Menu to a GUIBB

    Choose the General Settings panel. In the Additional Settings section, enter the Context Menu ID. Save and test your application. The context menu appears wherever you click on the screen.

Displaying a Context Menu as an Action Menu

Once you have created a context menu you can choose to display it as an action menu instead of a context menu. To do this, see the section Displaying a Context Menu as an Action Menu.