Products

  1. webMethods CAF 7.1.1
  2. BPM Designer 7.0
  3. BPM Designer 7.1
  4. MWS 7.0
  5. MWS 7.1

Article Types

  1. Sample Applications
  2. Core Concepts
  3. External References
  4. Webinars

Key Subjects

  1. Web Services
  2. Database
  3. JavaScript
  4. JSF Controls
  5. Task Development
  6. Task Inbox
  7. Task Assignments
  8. Task Events
  9. Debugging
  10. Web Application
 
MOST POPULAR
  1. CAF JavaDocs
  2. Designer Online Help
  3. CAF Java(Script)Docs
  4. Confirmation Dialog Tutorial
  5. CAF Samples for webMethods 7.1...
  6. CAF and JSF
  7. JSF Binding Expressions
  8. Dynamic Panel Switch Applicati...
WHATS NEW
  1. Session State Mgmt
  2. Print Table
  3. Popup Dialog

Role Based Complex Navigation

This article demonstrate how to restrict navigation controls to display navigation links on bases of the user role.
  1. webMethods CAF 7.1.1
  2. | JSF Controls
  3. | Web Application
  4. | Sample Applications
Building Application Navigation Files For Each Role


An application navigation file (e.g., app-nav.xml) defines the navigation for an application. To have different navigation for each role, set up an application navigation file for each role. For information about how to use these application navigation files to define the navigation for views in your application, see Building the Navigation Controls for the Application Views.
*
Create additional application navigation files for other roles. An easy way to create a new application navigation file is to make a copy of the default app-nav.xml file and change it as necessary.
The sample uses the default application navigation file (app-nav.xml) for the admin role. It contains all the views for the application because users in the admin role can access all views.
For the tomcat role, you add an additional application navigation file that lists the two views that users in the tomcat role can access.
a
From the Solutions view, open the User Interfaces > Project > Web Navigation (app-nav.xml).
b
Click the Configuration tab.
For the use case that illustrates this sample, use the app-nav.xml file for the admin role. Users in this role can access all views, so add all views to the file. When adding the roles, you can group the views in a logical manner, as described in the steps that follow.
a
On the Application Navigation Configuration window, select the Home node in the tree on the left and click Add.
b
Expand the Home node to reveal the new sub-node that Designer added to the tree.
d
On the right, specify a name in the Title field, for example, Admin Navigation.
Note: The application will use the titles that you specify in the application navigation file as the menu names/selections in the navigation controls that you add you your views. As a result, when specifying titles, be sure to use the keywords that you want the application to display in your views.
f
Repeat step 2a through step 2e for the tomcat role and set the Title to User Navigation.
1
Select the Admin Navigation node on the left and click Add.
Specify the view you are adding or click Browse to choose the view. For the sample the adminNav.view is in the WebContent/admin folder, so specify /admin/adminNav.view.
Specify the URL to the page within the project. For the sample with the project name, wm_rolebased_navigation, specify /wm_rolebased_navigation/admin/adminNav.view.
5
Add the other administrative view under the Admin Navigation node, using the following Navigation Page Details:
1
Add the first user view under the User Navigation node, using the following Navigation Page Details:
2
Add the other user view under the User Navigation node, using the following Navigation Page Details:
a
From the Project view, right click the Project > WebContent > WEB_INF > app-nav.xml node and select Copy.
b
Right click the Project > WebContent node and select Paste.
d
For the sample, because the new application navigation file is for the tomcat role, it only needs to contain the views that all users can access. Because the new file is a copy of the app-nav.xml file that contains all the views for the tomcat and admin roles, to update this copy so it is specific for the tomcat role only, delete the admin role views.
a
To open the application navigation file, in the Project view, right click the new application navigation file (e.g., Project > WebContent > WEB_INF > app-nav-user.xml) and select Open with > Other.
b
In the Editor Selection window, select app-nav.xml Editor and click OK.
c
Click the Configuration tab.
d
In the Application Navigation Configuration tree, select the Admin Navigation node, which has the two administrative views that you added as sub-nodes.
e
Click Delete to delete the Admin Navigation node and its sub-nodes, the administrative views.
5
Repeat step 3 and step 4 for all additional roles that you want to provide separate navigation for.
Related Topics 
 
 
Powered by webMethods
Samples and utilities are "working examples" that can be used to test and build production-quality solutions.
Most are not eligible for technical support through webMethods Customer Care.
webMethods makes no guarantees pertaining to the functionality, scalability, robustness, or degree of testing of these utilities and samples.