com.filenet.wcm.toolkit.server.ui
Class WcmMultiPanelModule

java.lang.Object
  extended bycom.filenet.wcm.toolkit.server.base.WcmDpContainer
      extended bycom.filenet.wcm.toolkit.server.base.WcmModule
          extended bycom.filenet.wcm.toolkit.server.base.GlobalEventModule
              extended bycom.filenet.wcm.toolkit.server.base.WcmUiModule
                  extended bycom.filenet.wcm.toolkit.server.ui.WcmMultiPanelModule
All Implemented Interfaces:
WcmModuleInterface, WcmUiModuleInterface
Direct Known Subclasses:
WcmMultiPanelSequenceModule, WcmMultiPanelViewModule

public abstract class WcmMultiPanelModule
extends WcmUiModule

This is the framework multi panel base class. It is abstract, therefore it must be subclassed and have the required methods implemented in order to be useful.


Field Summary
protected  WcmController controller
          A controller class that registers ui modules and handles events.
protected  WcmUiModule currentModule
          The ui module of the currently selected panel.
protected  WcmPanel currentPanel
          The current panel.
protected  int currentPanelNumber
          The panel number of the currenly selected panel.
protected  java.util.List panelList
          A list that contains all panels added to the WcmMultiPanelModule module.
 
Fields inherited from class com.filenet.wcm.toolkit.server.base.WcmModule
locale, NAME_DELIMITER
 
Constructor Summary
WcmMultiPanelModule()
           
 
Method Summary
 int addPanel(java.lang.Class moduleClass, WcmString wsTitle)
          Adds a new module to the container.
 int addPanel(WcmPanel panel)
          Adds a new panel to the WcmMultiPanelModule.
 int addPanel(WcmUiModule module, WcmString wsTitle)
          Adds a new module to the container.
 int addPanel(WcmUiModule module, WcmString wsTitle, WcmString wsToolTip)
          Adds a new module to the container.
protected abstract  void addPanelSelectionAnchor(int panelNumber)
          Implements to construct any panel selection anchors needed to select panels.
 WcmUiModule getCurrentModule()
          Returns the currently selected ui module.
 WcmPanel getCurrentPanel()
          Returns the currently selected panel.
 java.lang.String getFormName()
          Returns the value of the formName of the currently selected panel.
 WcmUiModule getModule(int panelNumber)
          Returns the ui module by panel number.
 WcmString getMultiPanelModuleTitle()
          Gets the panel title.
 java.lang.String getMultiPanelModuleTitleString()
          Gets the panel title.
 WcmPanel getPanel(int panelNumber)
          Returns a panel by panel number.
 void initialize()
          Initializes the WcmMultiPanelModule by setting the current panel and the current panel module.
 void onExit(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Handles the onExit event.
 void onSelectPanel(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Event the occurs when user clicks on a panel switch link.
 void render(java.io.Writer w)
          Renders the WcmMultiPanelModule HTML.
 void selectPanel(int panelNumber)
          Does the work of onSelectTab.
 void selectPanel(int panelNumber, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Does the work of onSelectTab.
protected abstract  void setCurrentPanelSelection(int panelNumber)
          Implements the behavior of the panel selection anchors.
 void setMultiPanelModuleTitle(java.lang.String mainTitle)
           
 void setMultiPanelModuleTitle(WcmString mainTitle)
          Sets the panel title.
 
Methods inherited from class com.filenet.wcm.toolkit.server.base.WcmUiModule
getActive, getBasePath, getBaseUrl, getBaseURLBuilder, getControllerEventUrl, getControllerEventUrl, getEventFormFields, getEventFormFields, getEventFormTag, getEventFormTag, getEventUrl, getEventUrl, getEventUrl, getEventUrl, getFormSubmitUrl, getFormSubmitUrl, getGlobalEventUrl, getGlobalEventUrl, getPageUrl, getPageUrl, getPageUrl, getPageUrl, getUiParent, peekEvent, renderJSP, routeEvent, routeEvent, serverSideInclude, serverSideInclude, setActive, setJSP
 
Methods inherited from class com.filenet.wcm.toolkit.server.base.GlobalEventModule
onStartPage, subscribeGlobalEvent
 
Methods inherited from class com.filenet.wcm.toolkit.server.base.WcmModule
addChild, addChild, addChild, cleanup, debugTrace, getClassProperty, getClassProperty, getClassPropertyKeys, getConfiguration, getController, getDataStore, getModuleProperty, getModuleProperty, getModuleProperty, getModuleProperty, getModulePropertyKeys, getName, getParent, getWindowProperty, getWindowProperty, persist, queryDataProvider, setClassProperty, setClassProperty, setController, setModuleProperty, setModuleProperty, setName, setParent, setPortletParent, setWindowProperty
 
Methods inherited from class com.filenet.wcm.toolkit.server.base.WcmDpContainer
addDataProvider, addDataProvider
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.filenet.wcm.toolkit.server.base.WcmUiModuleInterface
onStartPage
 
Methods inherited from interface com.filenet.wcm.toolkit.server.base.WcmModuleInterface
addDataProvider, cleanup, getDataStore, getModuleProperty, getName, getParent, persist, queryDataProvider, setController, setModuleProperty, setName, setParent
 

Field Detail

currentModule

protected WcmUiModule currentModule
The ui module of the currently selected panel.


currentPanel

protected WcmPanel currentPanel
The current panel.


currentPanelNumber

protected int currentPanelNumber
The panel number of the currenly selected panel.


panelList

protected java.util.List panelList
A list that contains all panels added to the WcmMultiPanelModule module.


controller

protected WcmController controller
A controller class that registers ui modules and handles events.

Constructor Detail

WcmMultiPanelModule

public WcmMultiPanelModule()
Method Detail

initialize

public void initialize()
                throws java.lang.Exception
Initializes the WcmMultiPanelModule by setting the current panel and the current panel module.

Specified by:
initialize in interface WcmModuleInterface
Overrides:
initialize in class WcmModule
Throws:
java.lang.Exception - All Exceptions

getPanel

public WcmPanel getPanel(int panelNumber)
                  throws java.lang.Exception
Returns a panel by panel number.

Parameters:
panelNumber - The panel number being used to get the panel.
Returns:
The panel that has the specified panel number.
Throws:
java.lang.Exception - All Exceptions

addPanel

public int addPanel(WcmPanel panel)
             throws java.lang.Exception
Adds a new panel to the WcmMultiPanelModule.

Parameters:
panel - A new panel to add.
Returns:
The panel number of the new panel.
Throws:
java.lang.Exception - All Exceptions

addPanel

public int addPanel(WcmUiModule module,
                    WcmString wsTitle)
             throws java.lang.Exception
Adds a new module to the container.

Parameters:
module - a module to add.
wsTitle - The label for the module that will be displayed in the tab bar.
Returns:
The panel number of the new panel.
Throws:
java.lang.Exception - All Exceptions.

addPanel

public int addPanel(java.lang.Class moduleClass,
                    WcmString wsTitle)
             throws java.lang.Exception
Adds a new module to the container.

Parameters:
moduleClass - Class object of a module to add.
wsTitle - The label for the module that will be displayed in the tab bar.
Returns:
The panel number of the new panel.
Throws:
java.lang.Exception - All Exceptions.

addPanel

public int addPanel(WcmUiModule module,
                    WcmString wsTitle,
                    WcmString wsToolTip)
             throws java.lang.Exception
Adds a new module to the container.

Parameters:
module - a module to add.
wsTitle - a label for the module that will be displayed in the tab bar.
wsToolTip - tooltip for the tab label.
Returns:
The panel number of the new panel.
Throws:
java.lang.Exception - All Exceptions.

getCurrentModule

public WcmUiModule getCurrentModule()
                             throws java.lang.Exception
Returns the currently selected ui module.

Returns:
currently selected ui module.
Throws:
java.lang.Exception - All Exceptions.

getCurrentPanel

public WcmPanel getCurrentPanel()
                         throws java.lang.Exception
Returns the currently selected panel.

Returns:
currently selected panel.
Throws:
java.lang.Exception - All Exceptions.

getModule

public WcmUiModule getModule(int panelNumber)
                      throws java.lang.Exception
Returns the ui module by panel number.

Parameters:
panelNumber - The panel number of the panel.
Returns:
The ui module on the panel with the specified panel number.
Throws:
java.lang.Exception - All Exceptions.

getFormName

public java.lang.String getFormName()
Returns the value of the formName of the currently selected panel.

Specified by:
getFormName in interface WcmUiModuleInterface
Overrides:
getFormName in class WcmUiModule
Returns:
formName of the current module.

selectPanel

public void selectPanel(int panelNumber,
                        javax.servlet.http.HttpServletRequest request,
                        javax.servlet.http.HttpServletResponse response)
                 throws java.lang.Exception
Does the work of onSelectTab. Can be called from outside as well, but should be called only after initialize is called.

Parameters:
panelNumber - value representing the zero-based index of the panel to select.
request - HttpServletRequest object.
response - HttpServletResponse object.
Throws:
java.lang.Exception - All Exceptions.

selectPanel

public void selectPanel(int panelNumber)
                 throws java.lang.Exception
Does the work of onSelectTab. Can be called from outside as well.

Parameters:
panelNumber - Value representing the zero-based index of the panel to select.
Throws:
java.lang.Exception - All Exceptions.

onSelectPanel

public void onSelectPanel(javax.servlet.http.HttpServletRequest request,
                          javax.servlet.http.HttpServletResponse response)
                   throws java.lang.Exception
Event the occurs when user clicks on a panel switch link.

Parameters:
request - HttpServletRequest object.
response - HttpServletResponse object.
Throws:
java.lang.Exception - All Exceptions.

onExit

public void onExit(javax.servlet.http.HttpServletRequest request,
                   javax.servlet.http.HttpServletResponse response)
            throws java.lang.Exception
Handles the onExit event. When extending this method, call super.onExit() in the end.

Parameters:
request - HttpServletRequest object.
response - HttpServletResponse object.
Throws:
java.lang.Exception - All Exceptions.

setMultiPanelModuleTitle

public void setMultiPanelModuleTitle(WcmString mainTitle)
Sets the panel title.

Parameters:
mainTitle - The title to use as the title of the WcmMultiPanelModule module.

setMultiPanelModuleTitle

public void setMultiPanelModuleTitle(java.lang.String mainTitle)

getMultiPanelModuleTitle

public WcmString getMultiPanelModuleTitle()
Gets the panel title.

Returns:
The title of the WcmMultiPanelModule.

getMultiPanelModuleTitleString

public java.lang.String getMultiPanelModuleTitleString()
Gets the panel title.

Returns:
The title of the WcmMultiPanelModule.

render

public void render(java.io.Writer w)
            throws java.lang.Exception
Renders the WcmMultiPanelModule HTML.

Specified by:
render in interface WcmUiModuleInterface
Overrides:
render in class WcmUiModule
Parameters:
w - Writer object to write the output to.
Throws:
java.lang.Exception - All errors.

addPanelSelectionAnchor

protected abstract void addPanelSelectionAnchor(int panelNumber)
                                         throws java.lang.Exception
Implements to construct any panel selection anchors needed to select panels.

Parameters:
panelNumber - The panel number of the current panel.
Throws:
java.lang.Exception - All errors.

setCurrentPanelSelection

protected abstract void setCurrentPanelSelection(int panelNumber)
                                          throws java.lang.Exception
Implements the behavior of the panel selection anchors.

Parameters:
panelNumber - The panel number of the current panel.
Throws:
java.lang.Exception - All errors.


© Copyright IBM Corp. 2002, 2007. All Rights Reserved.