com.plumtree.uiinfrastructure.editor
Class LeftNavMenu

java.lang.Object
  extended by com.plumtree.uiinfrastructure.editor.LeftNavMenu

public class LeftNavMenu
extends java.lang.Object

This is helper class that contains the implementation of the left navigation menu as well as two inner classes. One for the sub menus and one the links. This class is mainly used by EditorAS and classes extending it. The left navigation menu is printed out in EditorHeaderView.

Author:
Julie Fournier

Constructor Summary
LeftNavMenu(java.lang.String _sCurrentASName)
          Creates a new Left Nav Menu object.
 
Method Summary
 void AddJavaScriptValidationToLink(java.lang.String _sDPName, java.lang.String _sJSName)
          To set a JavaScript to be called when the user tries to go to a particular Display Page.
 int AddLinkToSubMenu(int _nSubMenuID, java.lang.String _dpName)
          Creates a new link and adds it to the sub menu identified by the ID passed in argument.
 int AddLinkToSubMenu(int _nSubMenuID, java.lang.String _dpName, boolean _bIsMandatory)
          Creates a new link and adds it to the sub menu identified by the ID passed in argument.
 XPArrayList GetArrayOfNonVisitedMandatoryPages()
          Returns the array of non visited mandatory pages.
 XPArrayList GetArraySubMenus()
          Returns the array of sub menus.
 boolean HasUnvisitedMandatoryPage()
          Returns true if some of the mandatory pages have not been visited
 void HideLink(boolean _bHide, int _nSubMenuID, int _nLinkID)
          Will display or hide the link identified by the ID in argument.
 void HideLink(boolean _bHide, java.lang.String _sDPName)
          Will display or hide the link identified by the Display Page name in argument.
 void HideSubMenu(boolean _bHide, int _nSubMenuID)
          Will display or hide the sub menu identified by the ID in argument.
 void RemovePageFromMandatoryArray(java.lang.String _dpName)
          Removes the page in argument from the array of mandatory pages.
 void SetMandatoryPage(boolean _bIsMandatory, java.lang.String _dpName)
          Changes the status of the page in argument to mandatory or to non-mandatory.
 int StartNewSubMenu(java.lang.String _sSubMenuTitle)
          Creates a new sub menu, adds it to the array of menus and returns the ID of that new sub menu.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LeftNavMenu

public LeftNavMenu(java.lang.String _sCurrentASName)
Creates a new Left Nav Menu object. Should have only one menu per Editor.

Parameters:
_sCurrentASName - name of the AS you create that menu from
Method Detail

RemovePageFromMandatoryArray

public void RemovePageFromMandatoryArray(java.lang.String _dpName)
Removes the page in argument from the array of mandatory pages. This is to keep track of the mandatory pages. When the page is being visited by the user it should be removed from the array.

Parameters:
_dpName - Name of the Display Page to remove

SetMandatoryPage

public void SetMandatoryPage(boolean _bIsMandatory,
                             java.lang.String _dpName)
Changes the status of the page in argument to mandatory or to non-mandatory.

Parameters:
_bIsMandatory - New status
_dpName - Name of the Display Page

AddJavaScriptValidationToLink

public void AddJavaScriptValidationToLink(java.lang.String _sDPName,
                                          java.lang.String _sJSName)
To set a JavaScript to be called when the user tries to go to a particular Display Page.

Parameters:
_sDPName - Name of the Display Page to modify
_sJSName - Name of the JavaScript function

GetArrayOfNonVisitedMandatoryPages

public XPArrayList GetArrayOfNonVisitedMandatoryPages()
Returns the array of non visited mandatory pages.

Returns:
XPArrayList

HasUnvisitedMandatoryPage

public boolean HasUnvisitedMandatoryPage()
Returns true if some of the mandatory pages have not been visited

Returns:
boolean

AddLinkToSubMenu

public int AddLinkToSubMenu(int _nSubMenuID,
                            java.lang.String _dpName)
Creates a new link and adds it to the sub menu identified by the ID passed in argument. That link is going to the DP passed in argument in the current AS.

Parameters:
_nSubMenuID - ID of the sub menu you want to add that link to
_dpName - name of the display page this link should go to
Returns:
int ID of the newly created link. You need that ID only if you want to set optional settings on the link.

AddLinkToSubMenu

public int AddLinkToSubMenu(int _nSubMenuID,
                            java.lang.String _dpName,
                            boolean _bIsMandatory)
Creates a new link and adds it to the sub menu identified by the ID passed in argument. That link is going to the DP passed in argument in the current AS.

Parameters:
_nSubMenuID - ID of the sub menu you want to add that link to
_dpName - name of the display page this link should go to
_bIsMandatory - true if the link is mandatory
Returns:
int ID of the newly created link. You need that ID only if you want to set optional settings on the link.

GetArraySubMenus

public XPArrayList GetArraySubMenus()
Returns the array of sub menus.

Returns:
XPArrayList

HideLink

public void HideLink(boolean _bHide,
                     int _nSubMenuID,
                     int _nLinkID)
Will display or hide the link identified by the ID in argument.

Parameters:
_bHide - true to hide it, false to not hide it
_nSubMenuID - ID of the sub menu containing the link
_nSubMenuID - ID of the link in that sub menu

HideLink

public void HideLink(boolean _bHide,
                     java.lang.String _sDPName)
Will display or hide the link identified by the Display Page name in argument. If multiple instances of that DP are found, they will all be changed.

Parameters:
_bHide - true to hide it, false to not hide it
_sDPName - Name of the Display Page to hide

HideSubMenu

public void HideSubMenu(boolean _bHide,
                        int _nSubMenuID)
Will display or hide the sub menu identified by the ID in argument.

Parameters:
_bHide - true to hide it, false to not hide it
_nSubMenuID - ID of the sub menu

StartNewSubMenu

public int StartNewSubMenu(java.lang.String _sSubMenuTitle)
Creates a new sub menu, adds it to the array of menus and returns the ID of that new sub menu. The ID is the position of the sub menu in the array.

Parameters:
_sSubMenuTitle -
Returns:
int



Copyright © 2002,2003,2004,2005 Plumtree Software, Inc., All Rights Reserved.