com.plumtree.portalpages.common.browsingpropchooser
Class PropChooserModel

java.lang.Object
  extended by com.plumtree.uiinfrastructure.editor.EditorHelperModel
      extended by com.plumtree.uiinfrastructure.expandablelist.ExpListModel
          extended by com.plumtree.portalpages.common.browsingpropchooser.PropChooserModel
All Implemented Interfaces:
IPropChooserModelRO, IManagedObject, IModel, IModelRO, IMVCObject, IExpListModelRO, IPaginationModel, IPaginationModelRO

public class PropChooserModel
extends ExpListModel
implements IPropChooserModelRO

This is the implementation of the Expandable List for editing card properties.

Author:
stephenc

Field Summary
static int COL_STATUS_ADDED_NEW
           
static int COL_STATUS_COMMITTED
           
static int EXPLIST_COL_MAX
          Number total of columns
static int EXPLIST_COL_NAME
           
static int EXPLIST_COL_PROPID
           
static int EXPLIST_COL_STATUS
           
protected  PTImageType m_imgRowIcon
          Icon to display on each row, just before the input text.
protected  java.lang.Object m_oDefaultValue
          This is used on add to populate the input text of the newly added row.
protected  IPTSession m_ptSession
          IPTSession
 XPSortedDictionary m_xpUnusedProperties
          XPSortedDictionary
static int NEW_PROP_DEFAULTVALUE
           
static int NEW_PROP_PROPID_UNSELECTED
           
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
PropChooserModel()
           
 
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.
 java.lang.String GetName()
          Returns the Class name.
 int GetNewlySelectedPropertyID()
           
 PTImageType GetRowIcon()
          Returns the icon to display on each row before the input text.
 java.lang.String GetRowName(int _nRowIndex)
           
 int GetRowPropertyID(int _nRowIndex)
           
 int GetRowStatus(int _nRowIndex)
           
protected  int[] GetRowsToDelete(java.lang.String[] _aDataValue)
           
 java.lang.String GetSelectedProperties()
           
 XPSortedDictionary GetUnusedProperties()
           
 boolean InitializeSelectedProperties(IPTSession _ptSession)
           
 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)
          Saves the data on the row _nRowIndex.
 void SetEnableMoveRowActions(boolean _bEnableMoveRowActions)
          Because this select ptobject list needs to support both move row actions enable and disable, we need to change the colspan of the header row when this happens.
protected  void SetRowStatus(int _nRowIndex, int _nStatus)
           
 
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, GetWrapColumnHeaders, InitializeExpandableList, InitializeReadOnlyExpandableList, IsAddButtonDisabled, IsCheckBoxesDisabled, IsPaginationEnabled, ModifyRow, MoveDown, MoveFirst, MoveLast, MoveRow, MoveUp, ReverseCurrentSort, SaveSection, SetAddIcon, SetAddIconAlt, SetDeleteIcon, SetDeleteIconAlt, SetDelRowConfirmMsg, SetEmptyListMessages, SetEnableEmptyListClientValidation, 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.expandablelist.IExpListModelRO
GetAddIcon, GetAddIconAlt, GetAddLabel, GetAlertMessageForEmptyList, GetArrExpListColInfo, GetDeleteIcon, GetDeleteIconAlt, GetDelRowConfirmMsg, GetEmptyListInstructions, GetEmptyListMainMessage, GetEnableMoveRowActions, GetIsListReadOnly, GetListKey, GetMainColumnSort, GetMainColumnSortDirection, GetModelStorageName, GetReadOnlyItems, GetSectionTitle, GetTableInstructions, GetUniqueInt, GetUniqueString, GetWrapColumnHeaders, IsAddButtonDisabled, IsCheckBoxesDisabled, IsPaginationEnabled
 
Methods inherited from interface com.plumtree.uiinfrastructure.form.pagination.IPaginationModelRO
GetCurrentLowerObjectCount, GetCurrentUpperObjectCount, GetNumObjects, GetPaginationSize
 
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

EXPLIST_COL_MAX

public static final int EXPLIST_COL_MAX
Number total of columns

See Also:
Constant Field Values

EXPLIST_COL_PROPID

public static final int EXPLIST_COL_PROPID
See Also:
Constant Field Values

EXPLIST_COL_NAME

public static final int EXPLIST_COL_NAME
See Also:
Constant Field Values

EXPLIST_COL_STATUS

public static final int EXPLIST_COL_STATUS
See Also:
Constant Field Values

COL_STATUS_COMMITTED

public static final int COL_STATUS_COMMITTED
See Also:
Constant Field Values

COL_STATUS_ADDED_NEW

public static final int COL_STATUS_ADDED_NEW
See Also:
Constant Field Values

NEW_PROP_DEFAULTVALUE

public static final int NEW_PROP_DEFAULTVALUE
See Also:
Constant Field Values

NEW_PROP_PROPID_UNSELECTED

public static final int NEW_PROP_PROPID_UNSELECTED
See Also:
Constant Field Values

m_xpUnusedProperties

public XPSortedDictionary m_xpUnusedProperties
XPSortedDictionary


m_ptSession

protected IPTSession m_ptSession
IPTSession


m_oDefaultValue

protected java.lang.Object m_oDefaultValue
This is used on add to populate the input text of the newly added row.


m_imgRowIcon

protected PTImageType m_imgRowIcon
Icon to display on each row, just before the input text.

Constructor Detail

PropChooserModel

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

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
Parameters:
_htFormData -

GetName

public java.lang.String GetName()
Returns the Class name.

Specified by:
GetName in interface IMVCObject
Specified by:
GetName in class EditorHelperModel
Returns:
String

GetNewlySelectedPropertyID

public int GetNewlySelectedPropertyID()
Specified by:
GetNewlySelectedPropertyID in interface IPropChooserModelRO
Returns:

GetRowIcon

public PTImageType GetRowIcon()
Returns the icon to display on each row before the input text. If the value is null, no icon is displayed.

Specified by:
GetRowIcon in interface IPropChooserModelRO
Returns:
PTImageType
See Also:
com.plumtree.uiinfrastructure.expandablelist.GrowableListModel#GetRowIcon()

GetRowName

public java.lang.String GetRowName(int _nRowIndex)
Specified by:
GetRowName in interface IPropChooserModelRO
Parameters:
_nRowIndex -
Returns:

GetRowPropertyID

public int GetRowPropertyID(int _nRowIndex)
Specified by:
GetRowPropertyID in interface IPropChooserModelRO
Parameters:
_nRowIndex -
Returns:

GetRowStatus

public int GetRowStatus(int _nRowIndex)
Specified by:
GetRowStatus in interface IPropChooserModelRO
Parameters:
_nRowIndex -
Returns:

GetSelectedProperties

public java.lang.String GetSelectedProperties()
Returns:

GetUnusedProperties

public XPSortedDictionary GetUnusedProperties()
Specified by:
GetUnusedProperties in interface IPropChooserModelRO
Specified by:
GetUnusedProperties in interface IExpListModelRO
Overrides:
GetUnusedProperties in class ExpListModel
Returns:

InitializeSelectedProperties

public boolean InitializeSelectedProperties(IPTSession _ptSession)
Parameters:
_ptSession -
_ptObject -
_sSectionTitle -
_imgAddIcon -
_sAddLabel -
_nListKey -
Returns:

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 -

SetEnableMoveRowActions

public void SetEnableMoveRowActions(boolean _bEnableMoveRowActions)
Because this select ptobject list needs to support both move row actions enable and disable, we need to change the colspan of the header row when this happens.

Overrides:
SetEnableMoveRowActions in class ExpListModel
Parameters:
_bEnableMoveRowActions -

GetRowsToDelete

protected int[] GetRowsToDelete(java.lang.String[] _aDataValue)
Parameters:
_aDataValue -
Returns:

SaveRow

protected int SaveRow(PTGrowableSortedArrayWrapper _saData,
                      int _nRowIndex,
                      XPHashtable _htFormData)
Saves the data on the row _nRowIndex.

Specified by:
SaveRow in class ExpListModel
Parameters:
_saData - List to update the data on row _nRowIndex
_nRowIndex - Index of the row to save.
_htFormData - Data posted by the form.
Returns:
int Status for server side validation.

SetRowStatus

protected void SetRowStatus(int _nRowIndex,
                            int _nStatus)
Parameters:
_nRowIndex -
_nStatus -



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