com.plumtree.portalnavigation.views
Class NavigationCommSectionComboBoxView

java.lang.Object
  extended by com.plumtree.portalnavigation.views.NavigationCommSectionComboBoxView

public class NavigationCommSectionComboBoxView
extends java.lang.Object

Horizontal navigation scheme using HTML select elements as menus (aka comboboxes or pull-down menus). This navigation view displays one to three community specific combobox menus with Community actions and community pages, Subcommunities and Related communities. This view is used by the NavTypeHorizontalComboBox navigation scheme in the below banner section, although it can be used in any horizontal space since it doesn't have any external dependencies. 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. Javascript is used to handle menu clicks.

Author:
robertz

Field Summary
protected  int m_nNumberCols
          Not used
protected static java.lang.String m_strInCommID
          Javascript variable name constants
protected static java.lang.String m_strRelComms
           
protected static java.lang.String m_strSubComms
           
static java.lang.String STR_MVC_CLASS_NAME
          MVC name
 
Constructor Summary
NavigationCommSectionComboBoxView()
           
 
Method Summary
protected  void AddGoToParentCommTab(HTMLTableRow tRow, ICPListEntryIterator cpList)
          Adds a tab with go to parent community image and action if there is a parent community.
protected  void AddTitleSelectBoxOption(HTMLSelect select, java.lang.String strTitle)
          Adds an HTML option with specified string to the provided HTML Select.
 java.lang.Object Create()
           
protected  HTMLSelect CreateSelectEleNavMenu(HTMLTableCell tCell, java.lang.String strSelectName)
          Helper method that adds an HTML select to the provided HTMLTableCell, also returns the HTML Select element.
 HTMLElement Display()
           
 HTMLScript DisplayJavascript()
           
static HTMLTableCell GetHorSpacerCell()
          Helper function that creates a horizontal spacer cell 4 pixels wide.
 java.lang.String GetName()
           
 void Init(IModelRO model, AActivitySpace parent)
           
protected  void WriteInCommComboBox(HTMLTableRow tRow, CommunityNavPage commP)
          Adds an HTML Select with an HTML Select containing In This Community links (Community pages and Community knowledge directoy)
protected  void WriteRelCommsComboBox(HTMLTableRow tRow, CommunityNavPage commP)
          Adds an HTML Select with an HTML Select containing Related Community links.
protected  void WriteSubCommsComboBox(HTMLTableRow tRow, CommunityNavPage commP)
          Adds an HTML Select with an HTML Select containing Subcommunity links.
 
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

m_strInCommID

protected static final java.lang.String m_strInCommID
Javascript variable name constants

See Also:
Constant Field Values

m_strRelComms

protected static final java.lang.String m_strRelComms
See Also:
Constant Field Values

m_strSubComms

protected static final java.lang.String m_strSubComms
See Also:
Constant Field Values

m_nNumberCols

protected int m_nNumberCols
Not used

Constructor Detail

NavigationCommSectionComboBoxView

public NavigationCommSectionComboBoxView()
Method Detail

Create

public java.lang.Object Create()
See Also:
com.plumtree.uiinfrastructure.activityspace.IManagedObject#Create()

Display

public HTMLElement Display()
See Also:
com.plumtree.uiinfrastructure.activityspace.IView#Display()

DisplayJavascript

public HTMLScript DisplayJavascript()
See Also:
com.plumtree.uiinfrastructure.activityspace.IView#DisplayJavascript()

GetName

public java.lang.String GetName()
See Also:
com.plumtree.uiinfrastructure.activityspace.IMVCObject#GetName()

Init

public void Init(IModelRO model,
                 AActivitySpace parent)
See Also:
com.plumtree.uiinfrastructure.activityspace.IView#Init(IModelRO, AActivitySpace)

AddTitleSelectBoxOption

protected void AddTitleSelectBoxOption(HTMLSelect select,
                                       java.lang.String strTitle)
                                throws HTMLException
Adds an HTML option with specified string to the provided HTML Select. The title will be prefixed and suffixed with dashes. " - Label - "

Parameters:
select - The Select to add the generated option to
strTitle - The option label
Throws:
HTMLException

CreateSelectEleNavMenu

protected HTMLSelect CreateSelectEleNavMenu(HTMLTableCell tCell,
                                            java.lang.String strSelectName)
                                     throws HTMLException
Helper method that adds an HTML select to the provided HTMLTableCell, also returns the HTML Select element.

Parameters:
tCell - The HTMLTableCell to add the generated select too
strSelectName - HTML ID of the select
Returns:
The generated HTML select
Throws:
HTMLException

WriteInCommComboBox

protected void WriteInCommComboBox(HTMLTableRow tRow,
                                   CommunityNavPage commP)
                            throws HTMLException
Adds an HTML Select with an HTML Select containing In This Community links (Community pages and Community knowledge directoy)

Parameters:
tRow - The Select to add the generated HTML select to
commP - The CommunityNavPage
Throws:
HTMLException

WriteRelCommsComboBox

protected void WriteRelCommsComboBox(HTMLTableRow tRow,
                                     CommunityNavPage commP)
                              throws HTMLException
Adds an HTML Select with an HTML Select containing Related Community links. Nothing is added if no related communities exist

Parameters:
tRow - The Select to add the generated HTML select to
commP - The CommunityNavPage
Throws:
HTMLException

WriteSubCommsComboBox

protected void WriteSubCommsComboBox(HTMLTableRow tRow,
                                     CommunityNavPage commP)
                              throws HTMLException
Adds an HTML Select with an HTML Select containing Subcommunity links. Nothing is added if no subcommunities exist

Parameters:
tRow - The Select to add the generated HTML select to
commP - The CommunityNavPage
Throws:
HTMLException

AddGoToParentCommTab

protected void AddGoToParentCommTab(HTMLTableRow tRow,
                                    ICPListEntryIterator cpList)
                             throws java.lang.Exception
Adds a tab with go to parent community image and action if there is a parent community. NavigationCommSectionDropDownView has a copy of this funtion too, update both when editing.

Parameters:
tRow - The HTMLTableRow to add the Tab too
cpList - ICPListIterator with a parent community (can only be one) or empty list if none exists.
Throws:
java.lang.Exception

GetHorSpacerCell

public static HTMLTableCell GetHorSpacerCell()
Helper function that creates a horizontal spacer cell 4 pixels wide.

Returns:
HTMLTableCell 4 pixel wide spacer cell



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