|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.plumtree.uiinfrastructure.editor.EditorHelperModel com.plumtree.uiinfrastructure.expandablelist.ExpListModel com.plumtree.portaluiinfrastructure.ptmulticolumnlist.PTMultiColumnListModel
public class PTMultiColumnListModel
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.
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.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.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 |
---|
public static final java.lang.String STR_MVC_CLASS_NAME
public static final java.lang.String SUBSPACE_KEY_SELECTTREE
public static final int EXPLIST_COL_CLASSID
public static final int EXPLIST_COL_OBJECTID
public static final int EXPLIST_COL_STRING
public static final int EXPLIST_DEFAULT_INITIAL_SIZE
public static final int HIDE_COL_MAX
public static final int HIDE_COL_CLASSID
public static final int HIDE_COL_OBJECTID
public static final int CREATE_NEW_COL_CLASSID
public static final int CREATE_NEW_COL_ASNAME
public static final int CREATE_NEW_COL_LABEL
public static final int CREATE_NEW_COL_ICON
public static final int CREATE_NEW_COL_PARAMS
public static final int CREATE_NEW_COL_MAX
public static final int CREATE_NEW_COL_MAXWITHPARAMS
public static final int PARAM_COL_PARAMNAME
public static final int PARAM_COL_PARAMVALUE
protected PTImageType m_imgRowIcon
protected java.lang.String m_sTreeSpaceID
protected java.lang.String m_sTreeSubTitle
protected java.lang.String m_sTreeTitle
protected java.lang.String m_strObjectsToHide
protected java.lang.String m_strTreeQueryFilter
protected java.lang.Object[][] m_arrCreateNewInfo
protected java.lang.String[] m_arrDefaultValue
protected int[] m_arrObjectClassIDs
protected boolean m_bIncludePTSelect
protected boolean m_bTreeMultiSelect
protected int m_intEditRow
protected int m_intNumColumns
protected int m_intPTObjectPosition
protected int m_nAccessLevel
protected java.lang.String m_sDisplayObjects
protected int m_treeLeafType
Constructor Detail |
---|
public PTMultiColumnListModel()
Method Detail |
---|
public static java.lang.Object[][] ParseFields(java.lang.String strMappedFields)
EditorModel.DoTaskOnStartEditor(XPHashtable)
public void AddControlParamsToURL(int _nClassID, ASURL myURL)
_nClassID
- myURL
- public void AddRowsOnRepost(XPHashtable _htFormData)
AddRowsOnRepost
in class ExpListModel
_htFormData
- Form datapublic void AddRowsToList(java.lang.Object[][] _aData)
_aData
- public boolean ContainsObject(int _nClassID, int _nObjectID)
_nClassID
- _nObjectID
-
public java.lang.Object Create()
EditorHelperModel
Create
in interface IManagedObject
Create
in class EditorHelperModel
IManagedObject.Create()
public void DoTaskOnComeBackFromSubEditor()
public int GetAccessLevel()
GetAccessLevel
in interface IPTMultiColumnListModelRO
public java.lang.Object[][] GetCreateNewInfo()
GetCreateNewInfo
in interface IPTMultiColumnListModelRO
public ASURL GetCreateNewURL(int _nClassID, java.lang.String _sEditorASName)
GetCreateNewURL
in interface IPTMultiColumnListModelRO
_nClassID
- _sEditorASName
-
public ASURL GetEditObjectURL(int _nClassID, int _nObjectID)
GetEditObjectURL
in interface IPTMultiColumnListModelRO
_nClassID
- _nObjectID
- _sEditorASName
-
public int GetEditRow()
GetEditRow
in interface IPTMultiColumnListModelRO
public java.lang.String GetHiddenObjects()
GetHiddenObjects
in interface IPTMultiColumnListModelRO
public boolean GetIncludePTSelect()
GetIncludePTSelect
in interface IPTMultiColumnListModelRO
public java.lang.Object[][] GetListValues()
public java.lang.String GetName()
GetName
in interface IMVCObject
GetName
in class EditorHelperModel
public int GetNumColumns()
GetNumColumns
in interface IPTMultiColumnListModelRO
public java.lang.String GetObjectClassIDs()
GetObjectClassIDs
in interface IPTMultiColumnListModelRO
public int GetPTObjectPosition()
GetPTObjectPosition
in interface IPTMultiColumnListModelRO
public PTImageType GetRowIcon()
GetRowIcon
in interface IPTMultiColumnListModelRO
public java.lang.String GetSelectedItems()
GetSelectedItems
in interface IPTMultiColumnListModelRO
public int GetTreeLeafType()
GetTreeLeafType
in interface IPTMultiColumnListModelRO
public java.lang.String GetTreeMultiSelect()
GetTreeMultiSelect
in interface IPTMultiColumnListModelRO
public java.lang.String GetTreeQueryFilter()
GetTreeQueryFilter
in interface IPTMultiColumnListModelRO
public java.lang.String GetTreeSpaceID()
GetTreeSpaceID
in interface IPTMultiColumnListModelRO
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)
_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).public void InitializeSortedArray(PTGrowableSortedArrayWrapper _saData)
InitializeSortedArray
in class ExpListModel
_saData
- public boolean IsEditLinkEnabled(int _nClassID)
IsEditLinkEnabled
in interface IPTMultiColumnListModelRO
_nClassID
- public void ModifyRow(XPHashtable _htFormData)
ModifyRow
in class ExpListModel
_htFormData
- public void SetAccessLevel(int nAccessLevel)
nAccessLevel
- The AccessLevel to setpublic void SetDefaultObjects(java.lang.Object[][] _arrRows)
_arrRows
- Array of rows to add.public void SetDefaultValue(java.lang.String[] _sDefaultValue)
_sDefaultValue
- New valuepublic void SetEditRow(int editRow)
editRow
- The row to setpublic void SetEnableCreateNew(java.lang.Object[][] _arrCreateNewInfo)
_arrCreateNewInfo
- Information for each create new linkpublic void SetEnableMoveRowActions(boolean _bEnableMoveRowActions)
SetEnableMoveRowActions
in class ExpListModel
_bEnableMoveRowActions
- public void SetHiddenObjects(int[][] _anClassIDObjectID)
_anClassIDObjectID
- - a two dimensional array of classID's and
ObjectID's. Objects specified will be hidden from display in the tree's
output.public void SetIncludePTSelect(boolean m_bIncludePTSelect)
m_bIncludePTSelect
- - true or falsepublic void SetNumColumns(int numColumns)
numColumns
- The numColumns to setpublic void SetPTObjectPosition(int pTObjectPosition)
pTObjectPosition
- The pTObjectPosition to setpublic void SetRowIcon(PTImageType _imgRowIcon)
_imgRowIcon
- public void SetTreeLeafType(int _leafType)
_leafType
- public void SetTreeMultiSelect(boolean _selectType)
_selectType
- public void SetTreeQueryFilter(int _nClassID, int _nPropID, int[] _anValues)
_nClassID
- _nPropID
- _anValues
- public void SetTreeSubTitle(java.lang.String _sTreeSubTitle)
_sTreeSubTitle
- public void SetTreeTitle(java.lang.String _sTreeTitle)
_sTreeTitle
- protected int SaveRow(PTGrowableSortedArrayWrapper _saData, int _nRowIndex, XPHashtable _htFormData)
SaveRow
in class ExpListModel
_saData
- List to update the data on row _nRowIndex_nRowIndex
- Index of the row to save._htFormData
- Data posted by the form.
public java.lang.String GetTreeSubTitle()
GetTreeSubTitle
in interface IPTMultiColumnListModelRO
public java.lang.String GetTreeTitle()
GetTreeTitle
in interface IPTMultiColumnListModelRO
public void SetDisplayObjects(java.lang.String _sDisplayObjects)
_sDisplayObjects
- public java.lang.String GetDisplayObjects()
GetDisplayObjects
in interface IPTMultiColumnListModelRO
String
- SelectPTObjectModel.GetDisplayObjects()
protected void SaveTreeID(XPHashtable _htFormData)
_htFormData
- Form data
|
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |