A script-enabled browser is required for this page to function properly.

REPLACE_MENU Built-in

Description

Replaces the current menu with the specified menu, but does not make the new menu active. REPLACE_MENU also allows you to change the way the menu displays and the role.

Because REPLACE_MENU does not make the new menu active, Oracle Forms does not allow the menu to obscure any part of the active canvas. Therefore, all or part of the menu does not appear on the screen if the active canvas would cover it.

Syntax

REPLACE_MENU;

PROCEDURE REPLACE_MENU
(menu_module_name VARCHAR2);

PROCEDURE REPLACE_MENU
(menu_module_name VARCHAR2,
menu_type
NUMBER);

PROCEDURE REPLACE_MENU
(menu_module_name VARCHAR2,
menu_type
NUMBER,
starting_menu_name
VARCHAR2);

PROCEDURE REPLACE_MENU
(menu_module_name VARCHAR2,
menu_type
NUMBER,
starting_menu
VARCHAR2,
group_name
VARCHAR2);

PROCEDURE REPLACE_MENU
(menu_module_name VARCHAR2,
menu_type
NUMBER,
starting_menu
VARCHAR2,
group_name
VARCHAR2,
use_file
BOOLEAN);

Built-in Type unrestricted procedure

Enter Query Mode yes

Usage Notes

Parameters

menu_module _name 
 
Name of the menu module that should replace the current menu module. Datatype is VARCHAR2. This parameter is optional; if it is omitted, Oracle Forms runs the form without a menu.
 
menu_type 
 
The display style of the menu. The following constants can be passed as arguments for this parameter:

PULL_DOWN Specifies that you want Oracle Forms to display the menus in a pull-down style that is characteristic of most GUI platforms.

starting_menu 
 
Specifies the menu within the menu module that Oracle Forms should use as the starting menu. The data type of the name is VARCHAR2.
 
group_name 
 
Specifies the security role that Oracle Forms is to use. If you do not specify a role name, Oracle Forms uses the current username to determine the role.
 
use_file 
 
Indicates how Oracle Forms should locate the menu .MMX file to be run. The data type of use_file is BOOLEAN.

TRUE Specifies that Oracle Forms should treat the menu_module value as a direct reference to a .MMX menu runfile in the file system. This value is the only one allowed.

REPLACE_MENU Example

/*

** Built-in: REPLACE_MENU
** Example: Use a standard procedure to change which root
** menu in the current menu application appears in
** the menu bar. A single menu application may
** have multiple "root-menus" which an application
** can dynamically set at runtime.
*/
PROCEDURE Change_Root_To(root_menu_name VARCHAR2) IS
BEGIN
Replace_Menu('MYAPPLSTD', PULL_DOWN, root_menu_name);
END;


Integrating form and menu modules