In this example, suppose that neither users nor administrators have been trained to work with Domains, and to prevent users from accidentally creating Domain resources, system administrators decide to remove any reference to Domains in the user interface.
| Removing Domains from the menu hides Domains but does not disable them. Users can still access Domains by entering the URI for the Domain webflow. See Working With Custom Java Classes for information on how to restrict a webflow. |
To remove the Domain menu items:
| 1. | Edit the file <js-webapp>/WEB-INF/actionModel-navigation.xml. This file defines the main menu visible by default on all pages of the server. In the XML that defines the actionModel, there are many condition tests that determine when each menu and menu item should be displayed. |
| “Mutton” is a term that means menu-button, and designates a button that creates a drop-down menu. |
| 2. | Find the section at the end for the Create menu and insert comments to remove the last menu item, as shown in the code sample above. |
| 3. | Edit the file <js-webapp>/WEB-INF/actionModel-search.xml. This file defines the context menu items visible when right-clicking on folders and resources in repository listings. |
| 4. | Find the section at the top of the file that creates the Add Resources sub-menu. Then add comments to remove the lines that define the Add Resources > Domain menu item, as shown in the code sample above. |
| 6. | When the web app has reloaded, log into JasperReports Server as jasperadmin. Click on the Create menu and right-click on a folder in the repository. In both cases, the menu item for Domain is no longer available. |
| When you remove a menu item, it is removed for all users, even administrators. Often it is preferable to prevent only non-administrators from viewing a menu item, as shown in the next section. |
Recommended Comments
There are no comments to display.