com.plumtree.portaluiinfrastructure.expandablelist.template
Class TemplateListModel

java.lang.Object
  extended by com.plumtree.uiinfrastructure.editor.EditorHelperModel
      extended by com.plumtree.uiinfrastructure.expandablelist.ExpListModel
          extended by com.plumtree.portaluiinfrastructure.expandablelist.template.TemplateListModel
All Implemented Interfaces:
ITemplateListModelRO, IManagedObject, IModel, IModelRO, IMVCObject, IExpListModelRO, IPaginationModel, IPaginationModelRO
Direct Known Subclasses:
CommunityTemplateSelectorModel, PageTemplateListModel

public class TemplateListModel
extends ExpListModel
implements ITemplateListModelRO

Author:
michaeld

Field Summary
static int EXPLIST_COL_COUNT
          Template Growable Array Column Count
static int EXPLIST_COL_INHERIT_TEMPLATE
          Template Growable Array Inherit Template Column
static int EXPLIST_COL_TEMPLATE_ID
          Template Growable Array Template ID Column
static int EXPLIST_COL_TEMPLATE_NAME
          Template Growable Array Template Name Column
protected  IPTSession m_Session
          IPTSession
static java.lang.String STR_MVC_CLASS_NAME
          Object Name
static java.lang.String SUBSPACE_NAME_COMMTEMP
          Key name used by the Activity Spce to store the community template editor.
static java.lang.String SUBSPACE_NAME_SELECTTEMPLATETREE
          Key name used by the Activity Space to store the select template tree.
 
Fields inherited from class com.plumtree.uiinfrastructure.expandablelist.ExpListModel
EXPLIST_COLUMN_COLSPAN, EXPLIST_COLUMN_ENABLESORT, EXPLIST_COLUMN_ID, EXPLIST_COLUMN_INVALID, EXPLIST_COLUMN_TITLE, EXPLIST_COLUMN_WIDTH, EXPLIST_SORTEDARRAY_PROPID_INDEX, m_arrExpListColInfo, m_bAddButtonDisabled, m_bCheckBoxesDisabled, m_bEnableMoveRowActions, m_bIsReadOnly, m_bWrapColumnHeaders, m_imgAddIcon, m_imgDeleteIcon, m_nListKey, m_nNextIndex, m_saData, m_sAddIconAlt, m_sAddLabel, m_sDeleteIconAlt, m_sDelRowConfirmMsg, m_sEmptyListAlert, m_sInstructions, m_sMainMessage, m_sSectionTitle, m_sTableInstructions, MAX_ROWS, MOVEACTION_DOWN, MOVEACTION_FIRST, MOVEACTION_LAST, MOVEACTION_UP, parent
 
Fields inherited from class com.plumtree.uiinfrastructure.editor.EditorHelperModel
m_asOwner
 
Constructor Summary
TemplateListModel()
           
 
Method Summary
 void AddRowsOnRepost(XPHashtable _htFormData)
          Will be called each time the add action is performed.
 java.lang.Object Create()
          This method is used by the ASManager to return new instances of managed objects.
 java.lang.String GetInputValue(java.lang.String name)
          Get the value for the given input.
 java.lang.String GetName()
          Returns the Class name.
 int GetTemplateClassID()
          Get the class ID of the template.
 void InitializeSortedArray(PTGrowableSortedArrayWrapper _saData)
          Will be called when this class is initalized.
 void InitializeTemplateList(IPTSession _Session, int _nTemplateClassID, int _nTemplateID, boolean _bInheritTemplate, java.lang.String _strSectionTitle, PTImageType _imgType, int _nListKey)
           
protected  int SaveRow(PTGrowableSortedArrayWrapper _saData, int _nRowIndex, XPHashtable _htFormData)
          Will be called each ime there is a repost to save the data on the list.
 int SaveSection(XPHashtable _htFormData)
          Saves the data on the Main page.
 void SetAddLabel(java.lang.String _strAddLabel)
          Set the label of the add button.
 
Methods inherited from class com.plumtree.uiinfrastructure.expandablelist.ExpListModel
DeleteRowsOnRepost, DisableAddButton, DisableCheckBoxes, EnablePagination, GetAddIcon, GetAddIconAlt, GetAddLabel, GetAlertMessageForEmptyList, GetArrayOfObjToDelete, GetArrExpListColInfo, GetCurrentLowerObjectCount, GetCurrentUpperObjectCount, GetDeleteIcon, GetDeleteIconAlt, GetDelRowConfirmMsg, GetEmptyListInstructions, GetEmptyListMainMessage, GetEnableMoveRowActions, GetIsListReadOnly, GetItems, GetListKey, GetMainColumnSort, GetMainColumnSortDirection, GetModelStorageName, GetMoveAction, GetNumObjects, GetPaginationSize, GetReadOnlyItems, GetRowIndex, GetSectionTitle, GetTableInstructions, GetUniqueInt, GetUniqueString, GetUnusedProperties, GetWrapColumnHeaders, InitializeExpandableList, InitializeReadOnlyExpandableList, IsAddButtonDisabled, IsCheckBoxesDisabled, IsPaginationEnabled, ModifyRow, MoveDown, MoveFirst, MoveLast, MoveRow, MoveUp, ReverseCurrentSort, SetAddIcon, SetAddIconAlt, SetDeleteIcon, SetDeleteIconAlt, SetDelRowConfirmMsg, SetEmptyListMessages, SetEnableEmptyListClientValidation, SetEnableMoveRowActions, SetIsListReadOnly, SetListKey, SetPagination, SetSectionTitle, SetTableInstructions, SetWrapColumnHeaders, SortByColumn
 
Methods inherited from class com.plumtree.uiinfrastructure.editor.EditorHelperModel
CleanupAllData, CleanupTempData, Init
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.plumtree.uiinfrastructure.activityspace.IModel
CleanupAllData, CleanupTempData, Init
 

Field Detail

STR_MVC_CLASS_NAME

public static final java.lang.String STR_MVC_CLASS_NAME
Object Name

See Also:
Constant Field Values

EXPLIST_COL_TEMPLATE_ID

public static final int EXPLIST_COL_TEMPLATE_ID
Template Growable Array Template ID Column

See Also:
Constant Field Values

EXPLIST_COL_TEMPLATE_NAME

public static final int EXPLIST_COL_TEMPLATE_NAME
Template Growable Array Template Name Column

See Also:
Constant Field Values

EXPLIST_COL_INHERIT_TEMPLATE

public static final int EXPLIST_COL_INHERIT_TEMPLATE
Template Growable Array Inherit Template Column

See Also:
Constant Field Values

EXPLIST_COL_COUNT

public static final int EXPLIST_COL_COUNT
Template Growable Array Column Count

See Also:
Constant Field Values

SUBSPACE_NAME_SELECTTEMPLATETREE

public static final java.lang.String SUBSPACE_NAME_SELECTTEMPLATETREE
Key name used by the Activity Space to store the select template tree.

See Also:
Constant Field Values

SUBSPACE_NAME_COMMTEMP

public static final java.lang.String SUBSPACE_NAME_COMMTEMP
Key name used by the Activity Spce to store the community template editor.

See Also:
Constant Field Values

m_Session

protected IPTSession m_Session
IPTSession

Constructor Detail

TemplateListModel

public TemplateListModel()
Method Detail

SetAddLabel

public void SetAddLabel(java.lang.String _strAddLabel)
Set the label of the add button. This must be called before InitializeTemplateList is called.

Parameters:
label - for the add button

AddRowsOnRepost

public void AddRowsOnRepost(XPHashtable _htFormData)
Description copied from class: ExpListModel
Will be called each time the add action is performed. Should take care of adding the row(s) to the list. Use the GetItems() method to get the list.

Specified by:
AddRowsOnRepost in class ExpListModel
Parameters:
_htFormData - Form data
See Also:
com.plumtree.uiinfrastructure.expandablelist.ExpListModel#AddRowsOnRepost(com.plumtree.openfoundation.util.XPHashtable)

InitializeTemplateList

public void InitializeTemplateList(IPTSession _Session,
                                   int _nTemplateClassID,
                                   int _nTemplateID,
                                   boolean _bInheritTemplate,
                                   java.lang.String _strSectionTitle,
                                   PTImageType _imgType,
                                   int _nListKey)

InitializeSortedArray

public void InitializeSortedArray(PTGrowableSortedArrayWrapper _saData)
Description copied from class: ExpListModel
Will be called when this class is initalized. Should take care of initializing _saData (calling Initialize).

Specified by:
InitializeSortedArray in class ExpListModel
See Also:
ExpListModel.InitializeSortedArray(com.plumtree.uiinfrastructure.arraywrapper.PTGrowableSortedArrayWrapper)

SaveSection

public int SaveSection(XPHashtable _htFormData)
Saves the data on the Main page.

Overrides:
SaveSection in class ExpListModel
Parameters:
_htFormData -
Returns:
int Status for server side validation

SaveRow

protected int SaveRow(PTGrowableSortedArrayWrapper _saData,
                      int _nRowIndex,
                      XPHashtable _htFormData)
Description copied from class: ExpListModel
Will be called each ime there is a repost to save the data on the list. Should contain the code to update the data on the row _nRowIndex.Use the SetItem method to update _saData and use _htFormData to retrieve the posted data.

Specified by:
SaveRow in class ExpListModel
Returns:
int
See Also:
com.plumtree.uiinfrastructure.expandablelist.ExpListModel#SaveRow(com.plumtree.uiinfrastructure.arraywrapper.PTGrowableSortedArrayWrapper, int, com.plumtree.openfoundation.util.XPHashtable)

Create

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

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

GetName

public java.lang.String GetName()
Description copied from class: EditorHelperModel
Returns the Class name.

Specified by:
GetName in interface IMVCObject
Specified by:
GetName in class EditorHelperModel
Returns:
String
See Also:
IMVCObject.GetName()

GetInputValue

public java.lang.String GetInputValue(java.lang.String name)
Description copied from interface: ITemplateListModelRO
Get the value for the given input.

Specified by:
GetInputValue in interface ITemplateListModelRO
Returns:
String
See Also:
ITemplateListModelRO.GetInputValue(java.lang.String)

GetTemplateClassID

public int GetTemplateClassID()
Description copied from interface: ITemplateListModelRO
Get the class ID of the template.

Specified by:
GetTemplateClassID in interface ITemplateListModelRO
Returns:
int
See Also:
ITemplateListModelRO.GetTemplateClassID()



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