Sun Java System Access Manager version 6 2005Q1
Sample
 

Main Page > Console Sample Page

Administration Console Samples - New Tab Sample


1. Purpose

Demonstrate how to add a new tab to the header view that is visible only to the top level administrator.

How is this done? Three new classes are needed, one for the navigation frame (UMNewTabNavViewBean), one for the data frame (UMNewTabDataViewBean), and one to decide if the tab should be displayed (UMNewTabListener). UMNewTabListener is invoked by the framework prior to the tab being displayed. This class detemines whether or not the user is a top-level administrator, which then allows the tab to be displayed. When the new tab is selected UMNewTabNavViewBean is invoked and the navigation frame gets refreshed and a link is displayed. Selecting the link will refresh the data frame with the current location DN.


2. Files

  1. UMNewTabNavViewBean.java
  2. UMNewTabDataViewBean.java
  3. model/UMNewTabModel.java
  4. model/UMNewTabModelImpl.java
  5. model/UMNewTabListener.java
  6. jsp/UMNewTabNav.jsp
  7. jsp/UMNewTabData.jsp


3. Directions

  1. Copy the above JSP files to $AM_INSTALL_DIR/web-src/applications/console/user
  2. Add the the following resource strings to the console properties file $AM_INSTALL_DIR/locale/amAdminModuleMsgs.properties
    	newTabNavLink.label=Invoke Data View
    	newTabDataInvoked.message=Data View is invoked. Current location is
    	module105_new=New Tab
    	
  3. Compile the Java files
    	cd $AM_INSTALL_DIR/samples/console/NewTab
    	gmake all
    	
  4. Create a new jar with the sample class files.
    	cd $AM_INSTALL_DIR/samples/console
    	jar cf am_console_sample.jar com
    	
  5. Copy the am_console_sample.jar into $AM_INSTALL_DIR/web-src/applications/WEB-INF/lib
  6. Redeploy the console Set the DEPLOY_LEVEL to 22 in the silent file
    For web server: run amws61config -s <silent file>
    For application server: run amas70config -s <silent file>
  7. Login as Top Level Administrator, select the Service Configuration tab, and select Administration Service. Add the following entry to the Administrative Console Tabs attribute. module105_new|/amconsole/user/UMNewTabNav.
  8. Add com.iplanet.am.console.user.model.UMNewTabListener to the Event Listener Class attribute.
  9. To see the new tab you can either re-login, or you can refresh the header frame of the console (by selecting one of the other visible tabs.)


End of Sample