com.plumtree.portaluiinfrastructure.ptmulticolumnlist
Class PTMultiColumnListModel

java.lang.Object
  extended by com.plumtree.uiinfrastructure.editor.EditorHelperModel
      extended by com.plumtree.uiinfrastructure.expandablelist.ExpListModel
          extended by com.plumtree.portaluiinfrastructure.ptmulticolumnlist.PTMultiColumnListModel
All Implemented Interfaces:
IPTMultiColumnListModelRO, IManagedObject, IModel, IModelRO, IMVCObject, IExpListModelRO, IPaginationModel, IPaginationModelRO
Direct Known Subclasses:
GlobalACLSyncMapListModel, UserInfoPropMapListModel

public class PTMultiColumnListModel
extends ExpListModel
implements IPTMultiColumnListModelRO

This is the implementation of the Expandable List framework for the the Select PTObject list. The Select PTObject is a list of objects. New objects can be added to the list by selecting them from the associated Object tree. The list is by default sorted by name ascending.

Author:
Julie Fournier

Field Summary
static int CREATE_NEW_COL_ASNAME
          Create new array column: AS Name
static int CREATE_NEW_COL_CLASSID
          Create new array column: class ID
static int CREATE_NEW_COL_ICON
          Create new array column: icon to display for the create new link
static int CREATE_NEW_COL_LABEL
          Create new array column: text to display with the create new link
static int CREATE_NEW_COL_MAX
          Size of each m_arrCreateNewInfo row
static int CREATE_NEW_COL_MAXWITHPARAMS
          Size of each m_arrCreateNewInfo row with optional control parameters.
static int CREATE_NEW_COL_PARAMS
          Create new array column: extra control arguments for the create action.
static int EXPLIST_COL_CLASSID
          This column contains the Object Class IDs.
static int EXPLIST_COL_OBJECTID
          This column contains the Object IDs.
static int EXPLIST_COL_STRING
          This is the String that we doisplay in the list.
static int EXPLIST_DEFAULT_INITIAL_SIZE
          Default initial size for the sorted array.
static int HIDE_COL_CLASSID
          This column of the passed Objects to Hide contains the class IDs.
static int HIDE_COL_MAX
          Number total of columns for hide objects array.
static int HIDE_COL_OBJECTID
          This column of the passed Objects to Hide contains the object IDs.
protected  java.lang.Object[][] m_arrCreateNewInfo
          Information about the create new links to display
protected  java.lang.String[] m_arrDefaultValue
          This is used on add to populate the non plumtree object columns with default values in the newly added row.
protected  int[] m_arrObjectClassIDs
          Class ID of the Objects displayed on the list.
protected  boolean m_bIncludePTSelect
          Indicates whether to include a Plumtree object picker in this list control.
protected  boolean m_bTreeMultiSelect
          Selection type for the object tree.
protected  PTImageType m_imgRowIcon
          Icon to display on each row, just before the input text.
protected  int m_intEditRow
          The index of the HTML row to display in edit mode.
protected  int m_intNumColumns
          Total number of columns in addition to the plumtree select columns.
protected  int m_intPTObjectPosition
          The zero-based position of the Plumtree object name column.
protected  int m_nAccessLevel
          This value determines the security access requirements for the objects to be added to the list...
protected  java.lang.String m_sDisplayObjects
          Class IDs and Object IDs of objects to display in the tree.
protected  java.lang.String m_sTreeSpaceID
          Tree Space ID.
protected  java.lang.String m_sTreeSubTitle
          Tree sub title
protected  java.lang.String m_sTreeTitle
          Tree title
protected  java.lang.String m_strObjectsToHide
          Objects to hide for the object tree.
protected  java.lang.String m_strTreeQueryFilter
          Query Filter for the object tree.
protected  int m_treeLeafType
          Leaf type for the object tree.
static int PARAM_COL_PARAMNAME
          Optional control parameter index for the parameter name.
static int PARAM_COL_PARAMVALUE
          Optional control parameter index for the parameter value.
static java.lang.String STR_MVC_CLASS_NAME
          Class name for the activity space
static java.lang.String SUBSPACE_KEY_SELECTTREE
          Key name used by the Activity Space to store the 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
PTMultiColumnListModel()
           
 
Method Summary
 void AddControlParamsToURL(int _nClassID, ASURL myURL)
          Helper function for extracting and adding extra control parameters from the create object string.
 void AddRowsOnRepost(XPHashtable _htFormData)
          Clear the list and add all the values selected from the tree, as well as values or defaults for the other columns in the control.
 void AddRowsToList(java.lang.Object[][] _aData)
          Adds an array of new rows to the list.
 boolean ContainsObject(int _nClassID, int _nObjectID)
          Tells whether the Object identified by the class ID and the object ID in argument is in the list or no.
 java.lang.Object Create()
          This method is used by the ASManager to return new instances of managed objects.
 void DoTaskOnComeBackFromSubEditor()
          This method will be called when you come back to the main Editor from a sub Editor.
 int GetAccessLevel()
          Returns the accesslevel of the objects for the tree control to display.
 java.lang.Object[][] GetCreateNewInfo()
          Returns the create new actions information.
 ASURL GetCreateNewURL(int _nClassID, java.lang.String _sEditorASName)
          Returns the URL to the Editor in create mode (new object).
 java.lang.String GetDisplayObjects()
          Returns the array of objects to display in the tree.
 ASURL GetEditObjectURL(int _nClassID, int _nObjectID)
          Returns the URL to edit the object.
 int GetEditRow()
          Returns the row currently being edited.
 java.lang.String GetHiddenObjects()
          Returns the comma-delimited string of classids and objectids for objects that are to be hidden by the tree.
 boolean GetIncludePTSelect()
          Returns true if this list includes a Plumtree object selected from the tree object selector .
 java.lang.Object[][] GetListValues()
          This method should ge used by the client to get back the array of values other than the 3 columns used for the Plumtree selected object (ObjectID, ClassID, and Name) at the end of the Editor and store them.
 java.lang.String GetName()
          Returns the Class name.
 int GetNumColumns()
          Returns the number of columns other than the columns used by the Plumtree selected object.
 java.lang.String GetObjectClassIDs()
          Returns String of Class ID of the Objects displayed in the tree.
 int GetPTObjectPosition()
          Returns the zero-based display position of the selected Plumtree object, if applicable.
 PTImageType GetRowIcon()
          Returns the icon to display on each row before the input text.
 java.lang.String GetSelectedItems()
          Returns a String of Class IDs and Object IDs of the Objects to select in the tree.
 int GetTreeLeafType()
          Returns the leaf type of the tree.
 java.lang.String GetTreeMultiSelect()
          Returns the selection type of the tree.
 java.lang.String GetTreeQueryFilter()
          Returns the query filter for the tree.
 java.lang.String GetTreeSpaceID()
          Returns tree AS ID.
 java.lang.String GetTreeSubTitle()
          Returns the Tree sub title.
 java.lang.String GetTreeTitle()
          Returns the Tree title.
 void InitializePTMultiColumnList(java.lang.String _sSectionTitle, java.lang.String _sFirstColSubTitle, java.lang.String[] _sSectionSubTitle, PTImageType _imgAddIcon, java.lang.String _sAddLabel, int[] _arrObjectClassIDs, int _nListKey)
          Initializes the expandable list.
 void InitializeSortedArray(PTGrowableSortedArrayWrapper _saData)
          Initalizes the list (PTGrowableSortedArrayWrapper) with a column mapping and an array of sort.
 boolean IsEditLinkEnabled(int _nClassID)
          Returns true if it should be possible to edit Objects from this class ID.
 void ModifyRow(XPHashtable _htFormData)
          Action for modifying a row
static java.lang.Object[][] ParseFields(java.lang.String strMappedFields)
          Parses the string of mapped fields and returns a two dimensional array in the format expected by the Plumtree server
protected  int SaveRow(PTGrowableSortedArrayWrapper _saData, int _nRowIndex, XPHashtable _htFormData)
          Saves the data for columns other than the plumtree object select column on the row _nRowIndex.
protected  void SaveTreeID(XPHashtable _htFormData)
          Helper method to save the Tree ID on repost.
 void SetAccessLevel(int nAccessLevel)
          Sets the accesslevel of the objects for the tree control to display.
 void SetDefaultObjects(java.lang.Object[][] _arrRows)
          Add the array passed in argument to the list.
 void SetDefaultValue(java.lang.String[] _sDefaultValue)
          Sets a new default value.
 void SetDisplayObjects(java.lang.String _sDisplayObjects)
          Sets the array of objects to display in the tree.
 void SetEditRow(int editRow)
          Sets the row currently being edited.
 void SetEnableCreateNew(java.lang.Object[][] _arrCreateNewInfo)
          Enables the create new links for the Class ID in argument.
 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.
 void SetHiddenObjects(int[][] _anClassIDObjectID)
          Populates m_strObjectsToHide, a comma-delimited list of classid/objectid pairs.
 void SetIncludePTSelect(boolean m_bIncludePTSelect)
          Sets the value for m_bIncludePTSelect, indicating whether a Plumtree object selector should be included with this list.
 void SetNumColumns(int numColumns)
          Returns the number of columns other than the columns used by the Plumtree selected object.
 void SetPTObjectPosition(int pTObjectPosition)
          Sets the the zero-based display position of the selected Plumtree object, if applicable.
 void SetRowIcon(PTImageType _imgRowIcon)
          Sets the icon to display on each row before the input text.
 void SetTreeLeafType(int _leafType)
          Sets the leaf type for the tree.
 void SetTreeMultiSelect(boolean _selectType)
          Sets the selection type for the tree.
 void SetTreeQueryFilter(int _nClassID, int _nPropID, int[] _anValues)
          Sets the query filter for the tree.
 void SetTreeSubTitle(java.lang.String _sTreeSubTitle)
          Sets the Tree sub title.
 void SetTreeTitle(java.lang.String _sTreeTitle)
          Sets the Tree title.
 
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, 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, GetUnusedProperties, 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

SUBSPACE_KEY_SELECTTREE

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

See Also:
Constant Field Values

EXPLIST_COL_CLASSID

public static final int EXPLIST_COL_CLASSID
This column contains the Object Class IDs.

See Also:
Constant Field Values

EXPLIST_COL_OBJECTID

public static final int EXPLIST_COL_OBJECTID
This column contains the Object IDs.

See Also:
Constant Field Values

EXPLIST_COL_STRING

public static final int EXPLIST_COL_STRING
This is the String that we doisplay in the list. E.g.: Object name or folder path.

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

HIDE_COL_MAX

public static final int HIDE_COL_MAX
Number total of columns for hide objects array.

See Also:
Constant Field Values

HIDE_COL_CLASSID

public static final int HIDE_COL_CLASSID
This column of the passed Objects to Hide contains the class IDs.

See Also:
Constant Field Values

HIDE_COL_OBJECTID

public static final int HIDE_COL_OBJECTID
This column of the passed Objects to Hide contains the object IDs.

See Also:
Constant Field Values

CREATE_NEW_COL_CLASSID

public static final int CREATE_NEW_COL_CLASSID
Create new array column: class ID

See Also:
Constant Field Values

CREATE_NEW_COL_ASNAME

public static final int CREATE_NEW_COL_ASNAME
Create new array column: AS Name

See Also:
Constant Field Values

CREATE_NEW_COL_LABEL

public static final int CREATE_NEW_COL_LABEL
Create new array column: text to display with the create new link

See Also:
Constant Field Values

CREATE_NEW_COL_ICON

public static final int CREATE_NEW_COL_ICON
Create new array column: icon to display for the create new link

See Also:
Constant Field Values

CREATE_NEW_COL_PARAMS

public static final int CREATE_NEW_COL_PARAMS
Create new array column: extra control arguments for the create action. Use CREATE_NEW_COL_MAXWITHPARAMS to set the size of the array when using this element.

See Also:
Constant Field Values

CREATE_NEW_COL_MAX

public static final int CREATE_NEW_COL_MAX
Size of each m_arrCreateNewInfo row

See Also:
Constant Field Values

CREATE_NEW_COL_MAXWITHPARAMS

public static final int CREATE_NEW_COL_MAXWITHPARAMS
Size of each m_arrCreateNewInfo row with optional control parameters.

See Also:
Constant Field Values

PARAM_COL_PARAMNAME

public static final int PARAM_COL_PARAMNAME
Optional control parameter index for the parameter name. Used in the create new array column: icon to display for the create new link

See Also:
Constant Field Values

PARAM_COL_PARAMVALUE

public static final int PARAM_COL_PARAMVALUE
Optional control parameter index for the parameter value. Used in the create new array column: icon to display for the create new link

See Also:
Constant Field Values

m_imgRowIcon

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


m_sTreeSpaceID

protected java.lang.String m_sTreeSpaceID
Tree Space ID. The first time the ID is empty and a new AS is opened, but after that, we save the ID and the same tree AS is reopened each time.


m_sTreeSubTitle

protected java.lang.String m_sTreeSubTitle
Tree sub title


m_sTreeTitle

protected java.lang.String m_sTreeTitle
Tree title


m_strObjectsToHide

protected java.lang.String m_strObjectsToHide
Objects to hide for the object tree.


m_strTreeQueryFilter

protected java.lang.String m_strTreeQueryFilter
Query Filter for the object tree.


m_arrCreateNewInfo

protected java.lang.Object[][] m_arrCreateNewInfo
Information about the create new links to display


m_arrDefaultValue

protected java.lang.String[] m_arrDefaultValue
This is used on add to populate the non plumtree object columns with default values in the newly added row. Note, this array MUST be initialized explicitly by the client - it can't be null if it is used.


m_arrObjectClassIDs

protected int[] m_arrObjectClassIDs
Class ID of the Objects displayed on the list.


m_bIncludePTSelect

protected boolean m_bIncludePTSelect
Indicates whether to include a Plumtree object picker in this list control. If true, 2 hidden columns and a visible name column will be added to the list, along with the complete facility for picking Plumtree objects. If false, a simple text-entry multicolumn list will be produced.


m_bTreeMultiSelect

protected boolean m_bTreeMultiSelect
Selection type for the object tree. True to enable multiselect, false to disable multiselect.


m_intEditRow

protected int m_intEditRow
The index of the HTML row to display in edit mode. This is set when the user clicks on the Edit icon for a given row.


m_intNumColumns

protected int m_intNumColumns
Total number of columns in addition to the plumtree select columns. For each one of these columns, a text box will be displayed in EDIT mode, and a string in DISPLAY mode.


m_intPTObjectPosition

protected int m_intPTObjectPosition
The zero-based position of the Plumtree object name column. Ignored if b_bIncludePTSelect is false, and automatically set to zero if it is set to a number greater than intNumColumns.


m_nAccessLevel

protected int m_nAccessLevel
This value determines the security access requirements for the objects to be added to the list... (a filter for the tree control).


m_sDisplayObjects

protected java.lang.String m_sDisplayObjects
Class IDs and Object IDs of objects to display in the tree.


m_treeLeafType

protected int m_treeLeafType
Leaf type for the object tree.

Constructor Detail

PTMultiColumnListModel

public PTMultiColumnListModel()
Method Detail

ParseFields

public static java.lang.Object[][] ParseFields(java.lang.String strMappedFields)
Parses the string of mapped fields and returns a two dimensional array in the format expected by the Plumtree server

See Also:
EditorModel.DoTaskOnStartEditor(XPHashtable)

AddControlParamsToURL

public void AddControlParamsToURL(int _nClassID,
                                  ASURL myURL)
Helper function for extracting and adding extra control parameters from the create object string.

Parameters:
_nClassID -
myURL -

AddRowsOnRepost

public void AddRowsOnRepost(XPHashtable _htFormData)
Clear the list and add all the values selected from the tree, as well as values or defaults for the other columns in the control.

Specified by:
AddRowsOnRepost in class ExpListModel
Parameters:
_htFormData - Form data

AddRowsToList

public void AddRowsToList(java.lang.Object[][] _aData)
Adds an array of new rows to the list. This is only called when m_bIncludePTSelect is FALSE.

Parameters:
_aData -

ContainsObject

public boolean ContainsObject(int _nClassID,
                              int _nObjectID)
Tells whether the Object identified by the class ID and the object ID in argument is in the list or no.

Parameters:
_nClassID -
_nObjectID -
Returns:
boolean

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

DoTaskOnComeBackFromSubEditor

public void DoTaskOnComeBackFromSubEditor()
This method will be called when you come back to the main Editor from a sub Editor.


GetAccessLevel

public int GetAccessLevel()
Returns the accesslevel of the objects for the tree control to display.

Specified by:
GetAccessLevel in interface IPTMultiColumnListModelRO
Returns:
int

GetCreateNewInfo

public java.lang.Object[][] GetCreateNewInfo()
Returns the create new actions information.

Specified by:
GetCreateNewInfo in interface IPTMultiColumnListModelRO
Returns:
Object[][]

GetCreateNewURL

public ASURL GetCreateNewURL(int _nClassID,
                             java.lang.String _sEditorASName)
Returns the URL to the Editor in create mode (new object).

Specified by:
GetCreateNewURL in interface IPTMultiColumnListModelRO
Parameters:
_nClassID -
_sEditorASName -
Returns:
ASURL URL to the Editor

GetEditObjectURL

public ASURL GetEditObjectURL(int _nClassID,
                              int _nObjectID)
Returns the URL to edit the object.

Specified by:
GetEditObjectURL in interface IPTMultiColumnListModelRO
Parameters:
_nClassID -
_nObjectID -
_sEditorASName -
Returns:
ASURL URL to the Editor

GetEditRow

public int GetEditRow()
Returns the row currently being edited.

Specified by:
GetEditRow in interface IPTMultiColumnListModelRO
Returns:
int

GetHiddenObjects

public java.lang.String GetHiddenObjects()
Returns the comma-delimited string of classids and objectids for objects that are to be hidden by the tree. The format of the string is as follows: ClassID1,ObjectID1, ClassID2,ObjectID2, etc..

Specified by:
GetHiddenObjects in interface IPTMultiColumnListModelRO
Returns:
String

GetIncludePTSelect

public boolean GetIncludePTSelect()
Returns true if this list includes a Plumtree object selected from the tree object selector .

Specified by:
GetIncludePTSelect in interface IPTMultiColumnListModelRO
Returns:
boolean

GetListValues

public java.lang.Object[][] GetListValues()
This method should ge used by the client to get back the array of values other than the 3 columns used for the Plumtree selected object (ObjectID, ClassID, and Name) at the end of the Editor and store them. It should only be called in cases where there are columns other than the Plumtree object columns (i.e. m_intNumColumns > 0)

Returns:
Object[][]

GetName

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

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

GetNumColumns

public int GetNumColumns()
Returns the number of columns other than the columns used by the Plumtree selected object.

Specified by:
GetNumColumns in interface IPTMultiColumnListModelRO
Returns:
int

GetObjectClassIDs

public java.lang.String GetObjectClassIDs()
Returns String of Class ID of the Objects displayed in the tree. E.g.: "2,45,3" This is the format used by the tree.

Specified by:
GetObjectClassIDs in interface IPTMultiColumnListModelRO
Returns:
String

GetPTObjectPosition

public int GetPTObjectPosition()
Returns the zero-based display position of the selected Plumtree object, if applicable.

Specified by:
GetPTObjectPosition in interface IPTMultiColumnListModelRO
Returns:
int

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 IPTMultiColumnListModelRO
Returns:
PTImageType

GetSelectedItems

public java.lang.String GetSelectedItems()
Returns a String of Class IDs and Object IDs of the Objects to select in the tree. E.g.: "classID1,ObjID1,classID2,objID2" This is the format used by the tree.

Specified by:
GetSelectedItems in interface IPTMultiColumnListModelRO
Returns:
String

GetTreeLeafType

public int GetTreeLeafType()
Returns the leaf type of the tree.

Specified by:
GetTreeLeafType in interface IPTMultiColumnListModelRO
Returns:
int

GetTreeMultiSelect

public java.lang.String GetTreeMultiSelect()
Returns the selection type of the tree. Converts the boolean value to a string so that it can be put in the query string for the tree.

Specified by:
GetTreeMultiSelect in interface IPTMultiColumnListModelRO
Returns:
String

GetTreeQueryFilter

public java.lang.String GetTreeQueryFilter()
Returns the query filter for the tree.

Specified by:
GetTreeQueryFilter in interface IPTMultiColumnListModelRO
Returns:
String

GetTreeSpaceID

public java.lang.String GetTreeSpaceID()
Returns tree AS ID.

Specified by:
GetTreeSpaceID in interface IPTMultiColumnListModelRO
Returns:
String

InitializePTMultiColumnList

public void InitializePTMultiColumnList(java.lang.String _sSectionTitle,
                                        java.lang.String _sFirstColSubTitle,
                                        java.lang.String[] _sSectionSubTitle,
                                        PTImageType _imgAddIcon,
                                        java.lang.String _sAddLabel,
                                        int[] _arrObjectClassIDs,
                                        int _nListKey)
Initializes the expandable list.

Parameters:
_sSectionTitle - - Main title of the view.
_sFirstColSubTitle - - The subtitle for the selected Plumtree Object, if appropriate. If _bIncludePTSelect is FALSE, this shoudl be set to null.
_sSectionSubTitle - - An array of subtitles for non-plumtree object columns
_imgAddIcon - - Icon for the add action.
_sAddLabel - - Text to display next to the add icon.
_arrObjectClassIDs - - The Class ID of the objects displayed on the list. This should be null if _bIncludePTSelect is FALSE.
_nListKey - - In case you have multiple Expandable Lists on the same DP, they should have a different key (otherwise, just set it to 1).

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 -

IsEditLinkEnabled

public boolean IsEditLinkEnabled(int _nClassID)
Returns true if it should be possible to edit Objects from this class ID.

Specified by:
IsEditLinkEnabled in interface IPTMultiColumnListModelRO
Parameters:
_nClassID -

ModifyRow

public void ModifyRow(XPHashtable _htFormData)
Action for modifying a row

Overrides:
ModifyRow in class ExpListModel
Parameters:
_htFormData -

SetAccessLevel

public void SetAccessLevel(int nAccessLevel)
Sets the accesslevel of the objects for the tree control to display.

Parameters:
nAccessLevel - The AccessLevel to set

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.

SetDefaultValue

public void SetDefaultValue(java.lang.String[] _sDefaultValue)
Sets a new default value. By default this is an array of empty strings. This value is used on add to populate the input text of the newly added row.

Parameters:
_sDefaultValue - New value

SetEditRow

public void SetEditRow(int editRow)
Sets the row currently being edited.

Parameters:
editRow - The row to set

SetEnableCreateNew

public void SetEnableCreateNew(java.lang.Object[][] _arrCreateNewInfo)
Enables the create new links for the Class ID in argument. Doing this will also enbale the links to Edit the Objects in the list.

Parameters:
_arrCreateNewInfo - Information for each create new link

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 -

SetHiddenObjects

public void SetHiddenObjects(int[][] _anClassIDObjectID)
Populates m_strObjectsToHide, a comma-delimited list of classid/objectid pairs. The format of the string is as follows: ClassID1,ObjectID1, ClassID2,ObjectID2, etc..

Parameters:
_anClassIDObjectID - - a two dimensional array of classID's and ObjectID's. Objects specified will be hidden from display in the tree's output.

SetIncludePTSelect

public void SetIncludePTSelect(boolean m_bIncludePTSelect)
Sets the value for m_bIncludePTSelect, indicating whether a Plumtree object selector should be included with this list.

Parameters:
m_bIncludePTSelect - - true or false

SetNumColumns

public void SetNumColumns(int numColumns)
Returns the number of columns other than the columns used by the Plumtree selected object.

Parameters:
numColumns - The numColumns to set

SetPTObjectPosition

public void SetPTObjectPosition(int pTObjectPosition)
Sets the the zero-based display position of the selected Plumtree object, if applicable.

Parameters:
pTObjectPosition - The pTObjectPosition to set

SetRowIcon

public void SetRowIcon(PTImageType _imgRowIcon)
Sets the icon to display on each row before the input text. By default, no icon is displayed.

Parameters:
_imgRowIcon -

SetTreeLeafType

public void SetTreeLeafType(int _leafType)
Sets the leaf type for the tree. Is set to N_LEAFSELECT by default.

Parameters:
_leafType -

SetTreeMultiSelect

public void SetTreeMultiSelect(boolean _selectType)
Sets the selection type for the tree. Multiselect is set to true by default.

Parameters:
_selectType -

SetTreeQueryFilter

public void SetTreeQueryFilter(int _nClassID,
                               int _nPropID,
                               int[] _anValues)
Sets the query filter for the tree. By default there is no query filter.

Parameters:
_nClassID -
_nPropID -
_anValues -

SetTreeSubTitle

public void SetTreeSubTitle(java.lang.String _sTreeSubTitle)
Sets the Tree sub title.

Parameters:
_sTreeSubTitle -

SetTreeTitle

public void SetTreeTitle(java.lang.String _sTreeTitle)
Sets the Tree title.

Parameters:
_sTreeTitle -

SaveRow

protected int SaveRow(PTGrowableSortedArrayWrapper _saData,
                      int _nRowIndex,
                      XPHashtable _htFormData)
Saves the data for columns other than the plumtree object select column 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.

GetTreeSubTitle

public java.lang.String GetTreeSubTitle()
Returns the Tree sub title.

Specified by:
GetTreeSubTitle in interface IPTMultiColumnListModelRO
Returns:
String

GetTreeTitle

public java.lang.String GetTreeTitle()
Returns the Tree title.

Specified by:
GetTreeTitle in interface IPTMultiColumnListModelRO
Returns:
String

SetDisplayObjects

public void SetDisplayObjects(java.lang.String _sDisplayObjects)
Sets the array of objects to display in the tree. (Only those objects will be display in the tree.) The array in argument should be in the following format: classid1,objectid1,classid2,objectid2....

Parameters:
_sDisplayObjects -

GetDisplayObjects

public java.lang.String GetDisplayObjects()
Returns the array of objects to display in the tree.

Specified by:
GetDisplayObjects in interface IPTMultiColumnListModelRO
Parameters:
String -
See Also:
SelectPTObjectModel.GetDisplayObjects()

SaveTreeID

protected void SaveTreeID(XPHashtable _htFormData)
Helper method to save the Tree ID on repost.

Parameters:
_htFormData - Form data



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