Dynamic Support

The tab actions menu supports the ability to dynamically enable/disable and hide/show entries. This feature is supported using a combination of the dynamic attribute of the menu-item element, the loader-registry element and a Java loader implementation.

The Java loader implementation registered in the navigation configuration will be called when the tab is first loaded and based on the refresh options configured for a tab. The refresh options are configured in the tab configuration file (.tab). See tab-refresh for more information.

A menu item can be specified as dynamic in the menu configuration file (.mnu) by adding dynamic="true" to the relevant menu-item element.

Where the dynamic attribute is set, a loader-registry is then required and should define the fully qualified classname which implements the curam.util.tab.impl.DynamicMenuStateLoader interface.

The DynamicMenuStateLoader interface requires one method, loadMenuState, to be implemented. The loadMenuState method is passed the following parameters:

The loader implementation must decide which menu items to disable or hide. The method returns an object that represents the state of a given menu bar. A state must be set for all identifiers in the list. For more information on this interface, consult the Java Documentation.

Note: The list of menu item identifiers passed to the loadMenuState method are only those that have been identified as dynamic by the dynamic attribute on the menu-item element.