com.plumtree.portalnavigation.views
Class NavigationHorizontalComboBoxView

java.lang.Object
  extended by com.plumtree.portalnavigation.views.NavigationHorizontalComboBoxView
All Implemented Interfaces:
IManagedObject, IMVCObject, IView

public class NavigationHorizontalComboBoxView
extends java.lang.Object
implements IView

View for listing main navigation tabs using HTML Select elements This navigation view displays "My Pages", "My Communities", "Directory" and mandatory links combobox menus. Mandatory communities are displayed in a separate row as tabs. This view is used by the NavTypeHorizontalComboBox navigation scheme in the above banner section, although it can be used in any horizontal space since it doesn't have any external dependencies except for the mandatory community tabs which only needs navigationhorizontalcommon.js (included in NavTypeHorizontalComboBox.java). Combobox menus are native HTML elements, making them simple to create and use and they work in all browsers. The downside is that they are not very customizable. All entries in the list use the same style and they don't have support for images or other HTML in the menus.

Author:
robertz

Field Summary
static int COMMUNITY_TAB
           
static int DOCUMENTS_TAB
           
static java.lang.String m_spacerOptionRow
          Constant definitions of common strings
static java.lang.String m_spacerOptionRowFiller
           
static java.lang.String m_spacerOptionRowShort
           
static int MENU_TEXT_MAX_LENGTH
          Truncation width of the strings in the HTML Selects
static int MYPAGES_TAB
          Index for each of the navigation tabs
static int PREFERENCES_TAB
           
static java.lang.String STR_MVC_CLASS_NAME
          MVC name
 
Constructor Summary
NavigationHorizontalComboBoxView()
           
 
Method Summary
protected  void AddSelectOptions(HTMLSelect select, ICPListEntryIterator cpList, java.lang.String strLabelPrefix)
          Helper function to populate a select box with options from an ASCompoundList
static void AddSpacerSelectBoxOption(HTMLSelect select)
          Helper function that adds a row with dashes to the HTML Select menu
static void AddSpacerSelectBoxOptionFiller(HTMLSelect select)
          Helper function that adds a padding row to the HTML Select menu
static void AddSpacerSelectBoxOptionShort(HTMLSelect select)
          Helper function that adds an empty row to the HTML Select menu
protected  void AddTitleSelectBoxOption(HTMLSelect select, java.lang.String strTitle)
          Helper function that adds an row with a label to the HTML Select menu.
 java.lang.Object Create()
          This method is used by the ASManager to return new instances of managed objects.
protected  HTMLSelect CreateSelectEleNavMenu(HTMLTableCell tCell, java.lang.String strSelectName)
          Helper function that creates an HTML Select and adds it to the provided HTMLTableCell
 HTMLElement Display()
          This method returns the HTMLElement that encompasses the output of the View.
 HTMLScript DisplayJavascript()
          This method returns the HTMLScript that encompasses the Javascript on the page.
 HTMLScriptCollection DisplayViewJavascript()
          This method returns the HTMLScript that encompasses the Javascript on the page.
 java.lang.String GetName()
          Return the name of the MVC object.
 void Init(IModelRO model, AActivitySpace parent)
          This method initializes the View with the read only model interface it is supposed to draw it's data from as well as it's parent ActivitySpace (necessary to create URLS).
protected  void WriteCommunitiesSection(HTMLTableRow tRow)
          Adds a HTML Select to the specified HTMLTableRow with Community actions and My Community for the current user
protected  void WriteDocumentsSection(HTMLTableRow tRow)
          Adds a HTML Select to the specified HTMLTableRow with directory links
protected  void WriteMandLinksSection(HTMLTableRow tRow)
          Adds a HTML Select to the specified HTMLTableRow with the Mandatory Links for the current user
protected  void WriteMyPagesSection(HTMLTableRow tRow)
          Adds a HTML Select to the specified HTMLTableRow with Mypage actions and My pages for the current user.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STR_MVC_CLASS_NAME

public static final java.lang.String STR_MVC_CLASS_NAME
MVC name

See Also:
Constant Field Values

MENU_TEXT_MAX_LENGTH

public static final int MENU_TEXT_MAX_LENGTH
Truncation width of the strings in the HTML Selects

See Also:
Constant Field Values

MYPAGES_TAB

public static final int MYPAGES_TAB
Index for each of the navigation tabs

See Also:
Constant Field Values

COMMUNITY_TAB

public static final int COMMUNITY_TAB
See Also:
Constant Field Values

DOCUMENTS_TAB

public static final int DOCUMENTS_TAB
See Also:
Constant Field Values

PREFERENCES_TAB

public static final int PREFERENCES_TAB
See Also:
Constant Field Values

m_spacerOptionRow

public static final java.lang.String m_spacerOptionRow
Constant definitions of common strings

See Also:
Constant Field Values

m_spacerOptionRowFiller

public static final java.lang.String m_spacerOptionRowFiller
See Also:
Constant Field Values

m_spacerOptionRowShort

public static final java.lang.String m_spacerOptionRowShort
See Also:
Constant Field Values
Constructor Detail

NavigationHorizontalComboBoxView

public NavigationHorizontalComboBoxView()
Method Detail

Create

public java.lang.Object Create()
Description copied from interface: IManagedObject
This method is used by the ASManager to return new instances of managed objects.

Specified by:
Create in interface IManagedObject
Returns:
A new instance of the managed class (i.e. return new Foo();)
See Also:
IManagedObject.Create()

DisplayJavascript

public HTMLScript DisplayJavascript()
This method returns the HTMLScript that encompasses the Javascript on the page.

Specified by:
DisplayJavascript in interface IView
Returns:
HTMLScript
See Also:
IView.DisplayJavascript()

Display

public HTMLElement Display()
Description copied from interface: IView
This method returns the HTMLElement that encompasses the output of the View.

Specified by:
Display in interface IView
See Also:
IView.Display()

DisplayViewJavascript

public HTMLScriptCollection DisplayViewJavascript()
This method returns the HTMLScript that encompasses the Javascript on the page.

Returns:
HTMLScript
See Also:
IView.DisplayJavascript()

GetName

public java.lang.String GetName()
Description copied from interface: IMVCObject
Return the name of the MVC object.

Specified by:
GetName in interface IMVCObject
Returns:
the name of the object.
See Also:
com.plumtree.xpshared.activityspace.IView#GetName()

Init

public void Init(IModelRO model,
                 AActivitySpace parent)
Description copied from interface: IView
This method initializes the View with the read only model interface it is supposed to draw it's data from as well as it's parent ActivitySpace (necessary to create URLS).

Specified by:
Init in interface IView
See Also:
com.plumtree.xpshared.activityspace.IView#Init(IModel, AActivitySpace)

AddSelectOptions

protected void AddSelectOptions(HTMLSelect select,
                                ICPListEntryIterator cpList,
                                java.lang.String strLabelPrefix)
                         throws java.lang.Exception
Helper function to populate a select box with options from an ASCompoundList

Parameters:
select - HTML Select to populate
cpList - The list of links
Throws:
java.lang.Exception

AddSpacerSelectBoxOption

public static void AddSpacerSelectBoxOption(HTMLSelect select)
                                     throws HTMLException
Helper function that adds a row with dashes to the HTML Select menu

Parameters:
select - HTML Select to add the option row to
Throws:
HTMLException

AddSpacerSelectBoxOptionFiller

public static void AddSpacerSelectBoxOptionFiller(HTMLSelect select)
                                           throws HTMLException
Helper function that adds a padding row to the HTML Select menu

Parameters:
select - HTML Select to add the option row to
Throws:
HTMLException

AddSpacerSelectBoxOptionShort

public static void AddSpacerSelectBoxOptionShort(HTMLSelect select)
                                          throws HTMLException
Helper function that adds an empty row to the HTML Select menu

Parameters:
select - HTML Select to add the option to
Throws:
HTMLException

AddTitleSelectBoxOption

protected void AddTitleSelectBoxOption(HTMLSelect select,
                                       java.lang.String strTitle)
                                throws HTMLException
Helper function that adds an row with a label to the HTML Select menu. The label is prefixed and suffixed with dashes. Will look like: '- Label -'

Parameters:
select - HTML Select to add the option to
strTitle - The option row display
Throws:
HTMLException

CreateSelectEleNavMenu

protected HTMLSelect CreateSelectEleNavMenu(HTMLTableCell tCell,
                                            java.lang.String strSelectName)
                                     throws HTMLException
Helper function that creates an HTML Select and adds it to the provided HTMLTableCell

Parameters:
tCell - The HTMLTable cell to add the HTML Select too
strSelectName - The HTML ID of the select
Returns:
The created HTML Select element
Throws:
HTMLException

WriteCommunitiesSection

protected void WriteCommunitiesSection(HTMLTableRow tRow)
                                throws java.lang.Exception
Adds a HTML Select to the specified HTMLTableRow with Community actions and My Community for the current user

Parameters:
tRow - The HTMLTableRow to add the HTML Select to
Throws:
HTMLException
java.lang.Exception

WriteDocumentsSection

protected void WriteDocumentsSection(HTMLTableRow tRow)
                              throws java.lang.Exception
Adds a HTML Select to the specified HTMLTableRow with directory links

Parameters:
tRow - The HTMLTableRow to add the HTML Select to
Throws:
HTMLException
java.lang.Exception

WriteMandLinksSection

protected void WriteMandLinksSection(HTMLTableRow tRow)
                              throws java.lang.Exception
Adds a HTML Select to the specified HTMLTableRow with the Mandatory Links for the current user

Parameters:
tRow - The HTMLTableRow to add the HTML Select to
Throws:
HTMLException
java.lang.Exception

WriteMyPagesSection

protected void WriteMyPagesSection(HTMLTableRow tRow)
                            throws java.lang.Exception
Adds a HTML Select to the specified HTMLTableRow with Mypage actions and My pages for the current user.

Parameters:
tRow - The HTMLTableRow to add the HTML Select to
Throws:
HTMLException
java.lang.Exception



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