Configuring Siebel eBusiness Applications > Configuring Toolbars and Menus >

About Activating and Deactivating Menu Items and Toolbars


Menu items (both application-level and applet-level) and toolbar items can be activated or disabled at run time, by means of the CanInvokeMethod mechanism. CanInvokeMethod (for the method specified in the Command, Applet Method Menu Item, or Class Method Menu Item object) will be called automatically for each item prior to displaying the menu or toolbar. If CanInvokeMethod returns FALSE, the toolbar item or menu item is not displayed. The CanInvokeMethod logic in most cases is retargeted from the browser application to the applet class hierarchy on the server, and from there to the business component class hierarchy. The targeting sequence is described below in About Invoke Method Targeting.

Suppression and activation of individual applet-level menu items at design time is supported by means of the Suppress Menu Item property in the Class Method Menu Item and Applet Method Menu Item object types. This is applicable to applet-level menus only, not application-level menus or toolbars, in which the item must be added or removed explicitly in Tools. Design-time menu activation or suppression for applet-level menus provides the means to make a menu item available globally for applets of a given class and its subclasses, and then suppress it in particular applets where it is not desired. Certain applet-level menu items appear in virtually all applets (such as Copy, Edit, and Delete), others appear in virtually all list applets (such as Columns Displayed), and so on, but there are always exceptions in which a "standard" menu item for the applet's class needs to be suppressed for a specific applet.

To add applet-class-level menu items, you would add a Class Method Menu Item for a standard menu item for a given applet class. This menu item would not need to be re-included as Applet Method Menu Item object definitions in applets where you want the menu item to appear. You would only create Applet Method Menu Item object definitions in two circumstances: to add a menu item (not already provided by the applet's class) to the applet, or to suppress display of an applet-class-level item that the applet would normally inherit. In this latter case, you create an Applet Method Menu Item object definition with the same name as the applet-class-level menu item you want to suppress, and enter a value of FALSE for the Suppress Menu Item property.

Configuring Siebel eBusiness Applications