| 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).UMNewTabListeneris 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 selectedUMNewTabNavViewBeanis 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
 
UMNewTabNavViewBean.java
UMNewTabDataViewBean.java
model/UMNewTabModel.java
model/UMNewTabModelImpl.java
model/UMNewTabListener.java
jsp/UMNewTabNav.jsp
jsp/UMNewTabData.jsp 
 
 3. Directions
 
Copy the above JSP files to
	$AM_INSTALL_DIR/web-src/applications/console/userAdd 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
	Compile the Java files
	
	cd $AM_INSTALL_DIR/samples/console/NewTab
	gmake all
	Create a new jar with the sample class files.
	
	cd $AM_INSTALL_DIR/samples/console
	jar cf am_console_sample.jar com
	Copy the am_console_sample.jarinto$AM_INSTALL_DIR/web-src/applications/WEB-INF/libRedeploy the console
        Set the DEPLOY_LEVEL to 22 in the silent fileFor web server: run
 amws61config -s <silent file>For application server: run
 amas70config -s <silent file>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.Add com.iplanet.am.console.user.model.UMNewTabListenerto
	the Event Listener Class attribute.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.)
     |