Defining Custom Component Menus

This section discusses how to:

  • Create custom component menus.

  • Set menu item properties.

  • Set general properties.

  • (Optional) Set use properties.

After you create records, pages, and components, register your new component using the Registration Wizard. To do so you must first create a menu definition if one does not already exist. This definition enables you to add the component to the new menu (for navigational purposes) and register it in the portal.

To create a new menu definition:

  1. From the PeopleSoft Application Designer toolbar, select File > New..

  2. Select Menu from the list.

  3. Click OK.

  4. Select the Standard option for the menu type.

  5. Click OK.

    The thick rectangle surrounding the bar item indicates that this element in the menu definition is currently selected. The empty, dashed rectangle is a placeholder for a new bar item label.

  6. Assign a bar name and label.

    You can define multiple menu bars for the menu. Double-click the rectangle to display the Bar Item Properties dialog box.

  7. Enter the bar item name and label.

    The most commonly used bar item name is Use..

  8. Click OK to accept the settings in the Bar Item Properties dialog box.

    The new label appears in the menu, and the empty rectangle appears in a new location.

  9. Set the menu item properties.

    When creating a menu simply as a placeholder for components for the Registration Wizard, you need only add a separator bar to save the menu.

  10. Set the menu properties.

  11. Save the menu definition.

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:

  1. 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.

  2. Specify the menu item.

    Field or Control

    Definition

    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.

  3. Select the menu item type.

    Field or Control

    Definition

    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.

  4. Click the Select button.

  5. 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.

  6. Save the menu item if it has not yet been saved.

  7. In the menu definition, right-click the menu item, and then select View PeopleCode.

    The PeopleCode Editor appears.

  8. Add a PeopleCode program in the ItemSelected event of the menu item.

  9. After you enter a program, save the PeopleCode program and close the PeopleCode editor.

  10. (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.

  11. Click OK to accept the settings.

  12. Save the menu definition.

When you create or make changes to a menu, you should document the changes for future reference. You can do this on the General tab of the Menu Properties dialog box.

Field or Control

Definition

Description

Enter a descriptive name for the menu.

Comments

Add a description of the menu or any other useful information.

Owner ID

View a list of applications with which this menu is used. This list is helpful to identify the applications with which the menu is associated during application development.

Last Updated

View the date and time of the last modification and the name of the user who made the modification.

Setting properties on the Use tab of Menu Properties is optional. Any settings you assign are stored internally only.