|
|||||||||
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.expandablelist.selectptobject.SelectPTObjectModel
public class SelectPTObjectModel
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_MAX
Number total of columns |
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 int[] |
m_arrObjectClassIDs
Class ID of the Objects displayed on the list. |
protected int[][] |
m_arrReadOnlyObjects
JF- Array of classID/objectID that cannot be deleted from the list. |
protected boolean |
m_bNoRowIcons
JH: Set to true if no row icons are to be displayed. |
protected boolean |
m_bTreeMultiSelect
Selection type for the object tree. |
protected PTImageType |
m_imgDefaultRowIcon
Icon to display on each row, just before the input text. |
protected int |
m_nAccessLevel
This value determines the security access requirements for the objects to be added to the list... |
protected int |
m_nCommunityFolderID
Community Folder ID to display objects from. |
protected int |
m_nCommunityMode
Community Mode to display objects. |
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. |
protected XPHashtable |
m_xphtRowIcons
RWW: Stores multiple icons - allows us to store a different icon for each class id. |
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 int |
READ_ONLY_ROW_CLASSID
JF- Array of read-only objects: column index for classID. |
static int |
READ_ONLY_ROW_OBJECTID
JF- Array of read-only objects: column index for objectID. |
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 | |
---|---|
SelectPTObjectModel()
|
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 from the tree. |
void |
ClearHiddenObjects()
Clears the hidden objects for the tree. |
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. |
protected java.lang.Object[][] |
CreateIndexMapping(PTGrowableSortedArrayWrapper _saItems)
Helper method to create a temporary array of index mapping. |
void |
DoTaskOnComeBackFromSubEditor()
This method will be called when you come back to the main Editor from a sub Editor. |
int |
GetAccessLevel()
Returns the nAccessLevel. |
int |
GetCommunityFolderID()
Returns the community id for the tree. |
int |
GetCommunityMode()
Returns the community mode for the tree. |
java.lang.Object[][] |
GetCreateNewInfo()
Returns the create new action informations. |
ASURL |
GetCreateNewURL(int _nClassID,
java.lang.String _sEditorASName)
Returns the URL to the Editor in create mode (new object). |
PTImageType |
GetDefaultRowIcon()
Returns the icon to display on each row before the input text. |
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. |
java.lang.String |
GetHiddenObjects()
Returns the hidden objects for the tree. |
protected int |
GetIndex(java.lang.Object[][] _arrIndexMapping,
int _nClassID,
int _nObjectID)
Helper method to get the value of the index for the object identified by the object ID and class ID in argument. |
java.lang.String |
GetName()
Returns the Class name. |
boolean |
GetNoRowIcons()
Returns the value of the m_bNoRowIcons member variable. |
java.lang.String |
GetObjectClassIDs()
Returns String of Class ID of the Objects displayed in the tree. |
PTImageType |
GetRowIconByClassID(int _nClassID)
Returns the icon to display on each row before the input text, given a class id. |
java.lang.String |
GetSelectedItems()
Returns a String of Class IDs and Object IDs of the Objects to select in the tree. |
HTMLElementCollection |
GetSelectedNamesAsHTML()
Helper method to get a String with the selected Object names. |
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. |
java.lang.String |
GetUniquePopUpName(java.lang.String _sName)
Returns a unique String for the name of the pop-up. |
void |
InitializeListClassIDs(int[] _arrObjectClassIDs)
Partialally initializes the expandable list. |
void |
InitializeReadOnlySelectPTObject(java.lang.String _sSectionTitle,
java.lang.String _sSectionSubTitle,
int[] _arrObjectClassIDs,
int _nListKey)
Initializes the read only expandable list. |
void |
InitializeSelectPTObject(java.lang.String _sSectionTitle,
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. |
boolean |
IsObjectReadOnly(int _nClassID,
int _nObjectID)
Returns true if the object identified by the class id and the object id in argument is read only. |
void |
ResetTreeID()
Resets the tree ID, this way a new tree will be opened. |
protected int |
SaveRow(PTGrowableSortedArrayWrapper _saData,
int _nRowIndex,
XPHashtable _htFormData)
Saves the data on the row _nRowIndex. |
protected void |
SaveTreeID(XPHashtable _htFormData)
Helper method to save the Tree ID on repost. |
void |
SetAccessLevel(int nAccessLevel)
Sets the nAccessLevel. |
void |
SetCommunityFolderID(int _nCommunityFolderID)
Sets the community folder id for the tree. |
void |
SetCommunityMode(int _nCommunityMode)
Sets the community mode for the tree. |
void |
SetDefaultObjects(java.lang.Object[][] _arrRows)
Add the array passed in argument to the list. |
void |
SetDefaultRowIcon(PTImageType _imgRowIcon)
Sets the icon to display on each row before the input text. |
void |
SetDisplayObjects(java.lang.String _sDisplayObjects)
Sets the array of objects to display in the tree. |
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)
Sets the hidden objects for the tree. |
void |
SetNoRowIcons(boolean m_bNoRowIcons)
Sets the m_bNoRowIcons member variable. |
void |
SetReadOnlyObjects(int[][] _arrReadOnlyObjects)
Sets the read only objects. |
void |
SetRowIconByClassID(int _nClassID,
PTImageType _imgRowIcon)
Sets the icon to display on each row before the input text, given a class id. |
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_MAX
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_imgDefaultRowIcon
protected XPHashtable m_xphtRowIcons
protected boolean m_bNoRowIcons
protected java.lang.String m_sTreeSpaceID
protected java.lang.String m_sTreeSubTitle
protected java.lang.String m_sTreeTitle
protected java.lang.String m_sDisplayObjects
protected java.lang.String m_strObjectsToHide
protected java.lang.String m_strTreeQueryFilter
protected java.lang.Object[][] m_arrCreateNewInfo
protected int[] m_arrObjectClassIDs
protected boolean m_bTreeMultiSelect
protected int m_nAccessLevel
protected int m_nCommunityMode
com.plumtree.portaluiinfrastructure.tree.StartTreeControl.COMMUNITY_MODE
protected int m_nCommunityFolderID
protected int m_treeLeafType
protected int[][] m_arrReadOnlyObjects
public static final int READ_ONLY_ROW_CLASSID
public static final int READ_ONLY_ROW_OBJECTID
Constructor Detail |
---|
public SelectPTObjectModel()
Method Detail |
---|
public void AddControlParamsToURL(int _nClassID, ASURL myURL)
_nClassID
- myURL
- public java.lang.String GetUniquePopUpName(java.lang.String _sName)
GetUniquePopUpName
in interface ISelectPTObjectModelRO
_sName
- com.plumtree.portaluiinfrastructure.expandablelist.selectptobject.SelectPTObjectModel#GetUniquePopUpName()
public void AddRowsOnRepost(XPHashtable _htFormData)
AddRowsOnRepost
in class ExpListModel
_htFormData
- Form datapublic 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 ISelectPTObjectModelRO
GetAccessLevel()
public int GetCommunityMode()
GetCommunityMode
in interface ISelectPTObjectModelRO
GetCommunityMode()
public int GetCommunityFolderID()
GetCommunityFolderID
in interface ISelectPTObjectModelRO
GetCommunityFolderID()
public java.lang.Object[][] GetCreateNewInfo()
GetCreateNewInfo
in interface ISelectPTObjectModelRO
GetCreateNewInfo()
public ASURL GetCreateNewURL(int _nClassID, java.lang.String _sEditorASName)
GetCreateNewURL
in interface ISelectPTObjectModelRO
_nClassID
- _sEditorASName
-
com.plumtree.portaluiinfrastructure.expandablelist.selectptobject.SelectPTObjectModel#GetCreateNewURL()
public ASURL GetEditObjectURL(int _nClassID, int _nObjectID)
GetEditObjectURL
in interface ISelectPTObjectModelRO
_nClassID
- _nObjectID
- _sEditorASName
-
com.plumtree.portaluiinfrastructure.expandablelist.selectptobject.SelectPTObjectModel#GetEditObjectURL()
public java.lang.String GetHiddenObjects()
GetHiddenObjects
in interface ISelectPTObjectModelRO
GetHiddenObjects()
public java.lang.String GetName()
GetName
in interface IMVCObject
GetName
in class EditorHelperModel
public java.lang.String GetObjectClassIDs()
GetObjectClassIDs
in interface ISelectPTObjectModelRO
GetObjectClassIDs()
public PTImageType GetDefaultRowIcon()
GetDefaultRowIcon
in interface ISelectPTObjectModelRO
com.plumtree.portaluiinfrastructure.expandablelist.selectptobject.SelectPTObjectModel#GetRowIcon()
public PTImageType GetRowIconByClassID(int _nClassID)
GetRowIconByClassID
in interface ISelectPTObjectModelRO
com.plumtree.portaluiinfrastructure.expandablelist.selectptobject.SelectPTObjectModel#GetRowIconByClassID()
public java.lang.String GetSelectedItems()
GetSelectedItems
in interface ISelectPTObjectModelRO
GetSelectedItems()
public HTMLElementCollection GetSelectedNamesAsHTML()
GetSelectedNamesAsHTML
in interface ISelectPTObjectModelRO
GetSelectedNamesAsHTML()
public int GetTreeLeafType()
GetTreeLeafType
in interface ISelectPTObjectModelRO
GetTreeLeafType()
public java.lang.String GetTreeMultiSelect()
GetTreeMultiSelect
in interface ISelectPTObjectModelRO
GetTreeMultiSelect()
public java.lang.String GetTreeQueryFilter()
GetTreeQueryFilter
in interface ISelectPTObjectModelRO
GetTreeQueryFilter()
public java.lang.String GetTreeSpaceID()
GetTreeSpaceID
in interface ISelectPTObjectModelRO
GetTreeSpaceID()
public void ResetTreeID()
public java.lang.String GetTreeSubTitle()
GetTreeSubTitle
in interface ISelectPTObjectModelRO
GetTreeSubTitle()
public java.lang.String GetTreeTitle()
GetTreeTitle
in interface ISelectPTObjectModelRO
GetTreeTitle()
public void InitializeReadOnlySelectPTObject(java.lang.String _sSectionTitle, java.lang.String _sSectionSubTitle, int[] _arrObjectClassIDs, int _nListKey)
_sSectionTitle
- Main title._sSectionSubTitle
- Sub title_arrObjectClassIDs
- Class ID of the Objects displayed on the list._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 InitializeSelectPTObject(java.lang.String _sSectionTitle, java.lang.String _sSectionSubTitle, PTImageType _imgAddIcon, java.lang.String _sAddLabel, int[] _arrObjectClassIDs, int _nListKey)
_sSectionTitle
- Main title._sSectionSubTitle
- Sub title_imgAddIcon
- Icon for the add action._sAddLabel
- Text to display next to the add icon._arrObjectClassIDs
- Class ID of the Objects displayed on the list._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 InitializeListClassIDs(int[] _arrObjectClassIDs)
_arrObjectClassIDs
- Class ID of the Objects displayed on the list.public void InitializeSortedArray(PTGrowableSortedArrayWrapper _saData)
InitializeSortedArray
in class ExpListModel
_saData
- public boolean IsEditLinkEnabled(int _nClassID)
IsEditLinkEnabled
in interface ISelectPTObjectModelRO
_nClassID
- com.plumtree.portaluiinfrastructure.expandablelist.selectptobject.SelectPTObjectModel#IsEditLinkEnabled()
public void SetAccessLevel(int nAccessLevel)
nAccessLevel
- The nAccessLevel to setpublic void SetCommunityMode(int _nCommunityMode)
_nCommunityMode
- public void SetCommunityFolderID(int _nCommunityFolderID)
_nCommunityFolderID
- public void SetDefaultObjects(java.lang.Object[][] _arrRows)
_arrRows
- Array of rows to add.public void SetEnableCreateNew(java.lang.Object[][] _arrCreateNewInfo)
_arrCreateNewInfo
- Information for each create new linkpublic void SetEnableMoveRowActions(boolean _bEnableMoveRowActions)
SetEnableMoveRowActions
in class ExpListModel
_bEnableMoveRowActions
- public void ClearHiddenObjects()
ClearHiddenObjects
in interface ISelectPTObjectModelRO
ClearHiddenObjects()
public void SetHiddenObjects(int[][] _anClassIDObjectID)
_anClassIDObjectID
- public void SetReadOnlyObjects(int[][] _arrReadOnlyObjects)
_arrReadOnlyObjects
- public boolean IsObjectReadOnly(int _nClassID, int _nObjectID)
IsObjectReadOnly
in interface ISelectPTObjectModelRO
_nClassID
- _nObjectID
-
com.plumtree.portaluiinfrastructure.expandablelist.selectptobject.SelectPTObjectModel#IsObjectReadOnly()
public void SetDisplayObjects(java.lang.String _sDisplayObjects)
_sDisplayObjects
- public java.lang.String GetDisplayObjects()
GetDisplayObjects
in interface ISelectPTObjectModelRO
String
- GetDisplayObjects()
public boolean GetNoRowIcons()
GetNoRowIcons
in interface ISelectPTObjectModelRO
public void SetNoRowIcons(boolean m_bNoRowIcons)
m_bNoRowIcons
- public void SetDefaultRowIcon(PTImageType _imgRowIcon)
_imgRowIcon
- public void SetRowIconByClassID(int _nClassID, PTImageType _imgRowIcon)
_nClassID
- the class id to be associated with this icon_imgRowIcon
- the icon you want to be displayedpublic 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.
protected void SaveTreeID(XPHashtable _htFormData)
_htFormData
- Form dataprotected java.lang.Object[][] CreateIndexMapping(PTGrowableSortedArrayWrapper _saItems)
_saItems
- List items
protected int GetIndex(java.lang.Object[][] _arrIndexMapping, int _nClassID, int _nObjectID)
_arrIndexMapping
- Index mapping_nClassID
- Object class ID_nObjectID
- Object ID
|
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |