Setting Menu Item Properties
Set the menu item properties to define your menu item. When creating a new menu definition to be used in the Registration Wizard, select Separator from the Type area of the Menu Item Properties dialog box to save the menu definition for use in the Registration Wizard. If you decide not to use the Registration Wizard, complete the following procedure, and set the general and use properties for the menu definition.
To define a menu item:
-
In a standard menu definition, double-click a menu item to access its properties.
To create a new menu item, double-click the empty rectangle at the bottom of the menu.
-
Specify the menu item.
Field or Control Description Name
Specify the system name for the menu or menu item. Menu and menu item names must conform to a specific set of naming conventions for the system to recognize them: all uppercase letters, no embedded spaces, and no special characters (for example, %, ^, &, *, $, #).
Label
Specify the text label to appear on the menu. The label appears in the Home bar item or in a cascade menu of a menu group. You can place an ampersand in the text to assign a keyboard shortcut for the menu.
-
Select the menu item type.
Field or Control Description Component
Select for a standard component menu item.
PeopleCode
PeopleCode menu items trigger PeopleCode programs. The program runs in a component buffer context, which allows PeopleCode to access values in the component buffer.
Separator
Select this option when creating a menu for the Registration Wizard. Selecting this option disables all other fields in the Menu Item Properties dialog box.
-
Click the Select button.
-
Select an enabling component in the Open dialog box.
At runtime, standard PeopleCode menu items are always visible in a menu, but they are active (enabled) only when their enabling components are open.
-
Save the menu item if it has not yet been saved.
-
In the menu definition, right-click the menu item, and then select View PeopleCode.
The PeopleCode Editor appears.
-
Add a PeopleCode program in the ItemSelected event of the menu item.
-
After you enter a program, save the PeopleCode program and close the PeopleCode editor.
-
(Optional) Override the component search record.
You might want to reuse the same component multiple times with different search records. You can accomplish this by overriding the component search record at runtime when the component is opened from a menu item without creating separate copies of the component. The component override is temporary and occurs only when the component is opened from the menu item in which the override is set. It does not change the component definition.
Select the Override check box, and then select an override search record from the Override prompt field. The override search record must be a valid search record for the component; that is, it must have all of the search key fields that are at level 0 of the component pages.
-
Click OK to accept the settings.
-
Save the menu definition.