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

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.WcmAnchorList
All Implemented Interfaces:
WcmModuleInterface, WcmUiModuleInterface
Direct Known Subclasses:
WcmSelectableAnchorList

public abstract class WcmAnchorList
extends WcmUiModule

Primitive UI module that represents a list of WcmAnchor objects.


Field Summary
protected  java.util.List anchorList
           
 
Fields inherited from class com.filenet.wcm.toolkit.server.base.WcmModule
locale, NAME_DELIMITER
 
Constructor Summary
WcmAnchorList()
           
 
Method Summary
 int addAnchor(java.lang.String url, java.lang.String label)
          Adds new WcmAnchor to the list by creating a new WcmAnchor from parameters.
 int addAnchor(java.lang.String url, java.lang.String label, java.lang.String iconUrl)
          Adds new WcmAnchor to the list by creating a new WcmAnchor from parameters.
 int addAnchor(java.lang.String url, WcmString label)
          Adds new WcmAnchor to the list by creating a new WcmAnchor from parameters.
 int addAnchor(java.lang.String url, WcmString label, java.lang.String iconUrl)
          Adds new WcmAnchor to the list by creating a new WcmAnchor from parameters.
 int addAnchor(java.lang.String url, WcmString label, java.lang.String iconUrl, WcmString toolTip)
          Adds new WcmAnchor to the list by creating a new WcmAnchor from parameters.
 int addAnchor(WcmAnchor a)
          Adds new WcmAnchor to the list
 void clear()
          Clears the Anchor List
 WcmAnchor getAnchor(int idx)
          Returns the anchor by it's index.
 int getLength()
          Returns the length of the anchor contained in anchor.size.
 void initialize()
          Called by WcmController when the module is registered, and has access to the data store.
 int insertAnchor(int idx, WcmAnchor a, boolean after)
          Insert a new WcmAnchor to the list at the specified index
 WcmAnchor removeAnchor(int idx)
          Removes a WcmAnchor from the list
 void render(java.io.Writer w)
          Renders the anchor list html.
protected abstract  void renderAnchor(java.io.Writer w, int idx, int max, WcmAnchor a)
          This method needs to be defined in an implementation of WcmAnchorList.
protected  void renderClosingHTML(java.io.Writer w)
          This method may be defined in an implementation of WcmAnchorList.
protected  void renderOpeningHTML(java.io.Writer w)
          This method may be defined in an implementation of WcmAnchorList.
 
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, getFormName, 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

anchorList

protected java.util.List anchorList
Constructor Detail

WcmAnchorList

public WcmAnchorList()
Method Detail

initialize

public void initialize()
                throws java.lang.Exception
Description copied from interface: WcmModuleInterface
Called by WcmController when the module is registered, and has access to the data store. Do "constructor" types of things here.

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

getLength

public int getLength()
Returns the length of the anchor contained in anchor.size.


addAnchor

public int addAnchor(java.lang.String url,
                     WcmString label)
Adds new WcmAnchor to the list by creating a new WcmAnchor from parameters.

Parameters:
url - URL value of WcmAnchor to create and add to list.
label - Label of WcmAnchor to create and add to list.
Returns:
int

addAnchor

public int addAnchor(java.lang.String url,
                     java.lang.String label)
Adds new WcmAnchor to the list by creating a new WcmAnchor from parameters.

Parameters:
url - URL value of WcmAnchor to create and add to list.
label - Label of WcmAnchor to create and add to list.
Returns:
int

addAnchor

public int addAnchor(java.lang.String url,
                     WcmString label,
                     java.lang.String iconUrl)
Adds new WcmAnchor to the list by creating a new WcmAnchor from parameters.

Parameters:
url - URL value of WcmAnchor to create and add to list.
label - Label of WcmAnchor to create and add to list.
iconUrl - Url of icon of WcmAnchor to create and add to list.

addAnchor

public int addAnchor(java.lang.String url,
                     java.lang.String label,
                     java.lang.String iconUrl)
Adds new WcmAnchor to the list by creating a new WcmAnchor from parameters.

Parameters:
url - URL value of WcmAnchor to create and add to list.
label - Label of WcmAnchor to create and add to list.
iconUrl - Url of icon of WcmAnchor to create and add to list.

addAnchor

public int addAnchor(java.lang.String url,
                     WcmString label,
                     java.lang.String iconUrl,
                     WcmString toolTip)
Adds new WcmAnchor to the list by creating a new WcmAnchor from parameters.

Parameters:
url - URL value of WcmAnchor to create and add to list.
label - Label of WcmAnchor to create and add to list.
iconUrl - Url of icon of WcmAnchor to create and add to list.
toolTip - Tooltip of WcmAnchor to create and add to list.

addAnchor

public int addAnchor(WcmAnchor a)
Adds new WcmAnchor to the list

Parameters:
a - new WcmAnchor to add to the list

insertAnchor

public int insertAnchor(int idx,
                        WcmAnchor a,
                        boolean after)
Insert a new WcmAnchor to the list at the specified index

Parameters:
idx - The index to insert this anchor at.
a - A new WcmAnchor to add to the list
Returns:
The index of the new anchor

removeAnchor

public WcmAnchor removeAnchor(int idx)
                       throws java.lang.Exception
Removes a WcmAnchor from the list

Parameters:
idx - The index to remove.
Returns:
The revmoved WcmAnchor object.
Throws:
java.lang.Exception

getAnchor

public WcmAnchor getAnchor(int idx)
Returns the anchor by it's index.

Parameters:
idx - anchor index
Returns:
A WcmAnchor object.
Throws:
java.lang.IndexOutOfBoundsException - when the index is out of bounds

renderAnchor

protected abstract void renderAnchor(java.io.Writer w,
                                     int idx,
                                     int max,
                                     WcmAnchor a)
                              throws java.lang.Exception
This method needs to be defined in an implementation of WcmAnchorList.

Parameters:
w - Writer object
idx - index of the current anchor
max - index of the last anchor
a - WcmAnchor object
Throws:
java.lang.Exception - All Exceptions

renderOpeningHTML

protected void renderOpeningHTML(java.io.Writer w)
                          throws java.lang.Exception
This method may be defined in an implementation of WcmAnchorList. Default implementation does nothing

Parameters:
w - Writer object
Throws:
java.lang.Exception

renderClosingHTML

protected void renderClosingHTML(java.io.Writer w)
                          throws java.lang.Exception
This method may be defined in an implementation of WcmAnchorList. Default implementation does nothing

Parameters:
w - Writer object
Throws:
java.lang.Exception - All Exceptions

render

public void render(java.io.Writer w)
            throws java.lang.Exception
Renders the anchor list html.

Specified by:
render in interface WcmUiModuleInterface
Overrides:
render in class WcmUiModule
Parameters:
w - Writer object
Throws:
java.lang.Exception - All Exceptions

clear

public void clear()
Clears the Anchor List



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