com.plumtree.portalpages.browsing.editors.community
Class PageListModel

java.lang.Object
  extended by com.plumtree.uiinfrastructure.editor.EditorHelperModel
      extended by com.plumtree.uiinfrastructure.expandablelist.ExpListModel
          extended by com.plumtree.portalpages.browsing.editors.community.PageListModel
All Implemented Interfaces:
IPageListModelRO, IManagedObject, IModel, IModelRO, IMVCObject, IExpListModelRO, IPaginationModel, IPaginationModelRO

public class PageListModel
extends ExpListModel
implements IPageListModelRO

Author:
michaeld

Field Summary
static int EXPLIST_COL_MAX
          Page Growable Array Max Columns
static int EXPLIST_COL_PAGE_FROMCOMMTEMP
           
static int EXPLIST_COL_PAGE_MODEL
          Page Growable Array Page Model Column
static int EXPLIST_COL_PAGE_NAME
          Page Growable Array Page Name Column
static int EXPLIST_DEFAULT_INITIAL_SIZE
          Default initial size for the sorted array.
protected  int m_nPageCount
          Page Count
protected  IPTSession m_Session
          IPTSession
static java.lang.String NAME_COLUMN_WIDTH
          Column widths for the various columns.
static java.lang.String ORDERING_COLUMN_WIDTH
           
static java.lang.String STR_MVC_CLASS_NAME
          Object Name
static java.lang.String SUBSPACE_NAME_EDITPAGE
          Key name used by the Activity Space to store the edit page pop up.
static java.lang.String SUBSPACE_NAME_NEWPAGETREE
          Key name used by the Activity Space to store the new page tree.
static java.lang.String TEMPLATE_COLUMN_WIDTH
           
 
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
PageListModel()
           
 
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.
 void DeleteRowsOnRepost(XPHashtable _htFormData)
          Gets the array of checked rows and delete them from the list.
 void DoTaskOnComeBackFromSubEditor()
          Repost when edit page submitted.
 void EnableAddButton()
          enables the add button
 java.lang.String GetInputValue(java.lang.String name)
          Get the value for the given input.
 java.lang.String GetName()
          Returns the Class name.
 int GetNextAvailableUniqueID()
          Get next available unique id.
 int GetPageCount()
          Returns the number of pages selected.
 XPArrayList GetPagesToRemove()
          Returns the pages to remove as an XPArrayList of Integers.
 void InitializePageList(IPTSession _Session, int _nListKey)
          Method InitializePageList.
protected  java.lang.Object[][] InitializePages(IASQueryResult asqr)
          Method InitializePages.
 void InitializeSortedArray(PTGrowableSortedArrayWrapper _saData)
          Will be called when this class is initalized.
 void RepostNewPage()
          Repost when new page is added.
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 _label)
          modifies the Add Label shown on the Add button.
 void SetDefaultObjects(java.lang.Object[][] _arrRows)
          Add the array passed in argument to the list.
 
Methods inherited from class com.plumtree.uiinfrastructure.expandablelist.ExpListModel
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_MAX

public static final int EXPLIST_COL_MAX
Page Growable Array Max Columns

See Also:
Constant Field Values

EXPLIST_COL_PAGE_MODEL

public static final int EXPLIST_COL_PAGE_MODEL
Page Growable Array Page Model Column

See Also:
Constant Field Values

EXPLIST_COL_PAGE_NAME

public static final int EXPLIST_COL_PAGE_NAME
Page Growable Array Page Name Column

See Also:
Constant Field Values

EXPLIST_COL_PAGE_FROMCOMMTEMP

public static final int EXPLIST_COL_PAGE_FROMCOMMTEMP
See Also:
Constant Field Values

SUBSPACE_NAME_NEWPAGETREE

public static final java.lang.String SUBSPACE_NAME_NEWPAGETREE
Key name used by the Activity Space to store the new page tree.

See Also:
Constant Field Values

SUBSPACE_NAME_EDITPAGE

public static final java.lang.String SUBSPACE_NAME_EDITPAGE
Key name used by the Activity Space to store the edit page pop up.

See Also:
Constant Field Values

EXPLIST_DEFAULT_INITIAL_SIZE

public static final int EXPLIST_DEFAULT_INITIAL_SIZE
Default initial size for the sorted array.

See Also:
Constant Field Values

NAME_COLUMN_WIDTH

public static final java.lang.String NAME_COLUMN_WIDTH
Column widths for the various columns.

See Also:
Constant Field Values

TEMPLATE_COLUMN_WIDTH

public static final java.lang.String TEMPLATE_COLUMN_WIDTH
See Also:
Constant Field Values

ORDERING_COLUMN_WIDTH

public static final java.lang.String ORDERING_COLUMN_WIDTH
See Also:
Constant Field Values

m_Session

protected IPTSession m_Session
IPTSession


m_nPageCount

protected int m_nPageCount
Page Count

Constructor Detail

PageListModel

public PageListModel()
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:
ExpListModel.AddRowsOnRepost(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()

DeleteRowsOnRepost

public void DeleteRowsOnRepost(XPHashtable _htFormData)
Description copied from class: ExpListModel
Gets the array of checked rows and delete them from the list.

Overrides:
DeleteRowsOnRepost in class ExpListModel
See Also:
ExpListModel.DeleteRowsOnRepost(XPHashtable)

GetInputValue

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

Specified by:
GetInputValue in interface IPageListModelRO
Returns:
String
See Also:
IPageListModelRO.GetInputValue(String)

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

GetNextAvailableUniqueID

public int GetNextAvailableUniqueID()
Get next available unique id.

Returns:
int

GetPageCount

public int GetPageCount()
Description copied from interface: IPageListModelRO
Returns the number of pages selected.

Specified by:
GetPageCount in interface IPageListModelRO
Returns:
int nPageCount
See Also:
IPageListModelRO.GetPageCount()

GetPagesToRemove

public XPArrayList GetPagesToRemove()
Returns the pages to remove as an XPArrayList of Integers.

Returns:
XPArrayList

InitializePageList

public void InitializePageList(IPTSession _Session,
                               int _nListKey)
Method InitializePageList. Initializes the expandable list.

Parameters:
_Session -
_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(PTGrowableSortedArrayWrapper)

DoTaskOnComeBackFromSubEditor

public void DoTaskOnComeBackFromSubEditor()
Repost when edit page submitted.


RepostNewPage

public void RepostNewPage()
Repost when new page is added.


EnableAddButton

public void EnableAddButton()
enables the add button


SetAddLabel

public void SetAddLabel(java.lang.String _label)
modifies the Add Label shown on the Add button.


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

SetDefaultObjects

public void SetDefaultObjects(java.lang.Object[][] _arrRows)
Add the array passed in argument to the list. The array should be created using the EXPLIST_COL constants defined in this class.

Parameters:
_arrRows - Array of rows to add.

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:
ExpListModel.SaveRow(PTGrowableSortedArrayWrapper, int, XPHashtable)

InitializePages

protected java.lang.Object[][] InitializePages(IASQueryResult asqr)
Method InitializePages. Initializes the community pages using a query result. Only called when on start editor when editing a community, or when the community template is selected for the first time when creating a community.

Parameters:
asqr -



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