com.plumtree.portaluiinfrastructure.editor.commonpages.keywords
Class KeywordsModel

java.lang.Object
  extended by com.plumtree.uiinfrastructure.editor.EditorHelperModel
      extended by com.plumtree.uiinfrastructure.expandablelist.ExpListModel
          extended by com.plumtree.portaluiinfrastructure.editor.commonpages.keywords.KeywordsModel
All Implemented Interfaces:
IManagedObject, IModel, IModelRO, IMVCObject, IExpListModelRO, IPaginationModel, IPaginationModelRO

public class KeywordsModel
extends ExpListModel

This is the implementation of the Expandable List framework for the Keywords on an object. Add will not be allowed at this time.

Author:
michaeld

Field Summary
static int KEYWORDSMODEL_COL_INDEX
          First column: an index to keep the list sorted.
static int KEYWORDSMODEL_COL_KEYWORD
          Second column: name.
static int KEYWORDSMODEL_COL_MAX
          Max number of columns
static int KEYWORDSMODEL_COL_URL
          Fourth column: language.
static java.lang.String STR_MVC_CLASS_NAME
          Class name for the activity space
 
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
KeywordsModel()
           
 
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 GetName()
          Returns the Class name.
 void InitializeKeywords(IPTObject objToEdit, int _nListKey)
          Initializes the expandable list.
 void InitializeSortedArray(PTGrowableSortedArrayWrapper _saData)
          Initalizes the list (PTGrowableSortedArrayWrapper) with a column mapping and an array of sort.
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 when a repost occurs.
 
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
Class name for the activity space

See Also:
Constant Field Values

KEYWORDSMODEL_COL_MAX

public static final int KEYWORDSMODEL_COL_MAX
Max number of columns

See Also:
Constant Field Values

KEYWORDSMODEL_COL_INDEX

public static final int KEYWORDSMODEL_COL_INDEX
First column: an index to keep the list sorted.

See Also:
Constant Field Values

KEYWORDSMODEL_COL_KEYWORD

public static final int KEYWORDSMODEL_COL_KEYWORD
Second column: name.

See Also:
Constant Field Values

KEYWORDSMODEL_COL_URL

public static final int KEYWORDSMODEL_COL_URL
Fourth column: language.

See Also:
Constant Field Values
Constructor Detail

KeywordsModel

public KeywordsModel()
Method Detail

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)

InitializeSortedArray

public void InitializeSortedArray(PTGrowableSortedArrayWrapper _saData)
Initalizes the list (PTGrowableSortedArrayWrapper) with a column mapping and an array of sort. The growable array will always be sorted by the 1st column ascending.

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

InitializeKeywords

public void InitializeKeywords(IPTObject objToEdit,
                               int _nListKey)
Initializes the expandable list.

Parameters:
objToEdit - is the IPTObject to be edited

SaveSection

public int SaveSection(XPHashtable _htFormData)
Saves the data when a repost occurs. Editors using this framework need to call that method from the savePage method of the main Model.

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()



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