Uiinfrastructure API Docs  
 

ExpListModel Members

ExpListModel overview

Public Static Fields

EXPLIST_COLUMN_COLSPAN Colspan for the HTML cell.
EXPLIST_COLUMN_ENABLESORT Flag to know if the link to sort by that column should be enabled.
EXPLIST_COLUMN_ID Key (as an Integer) to get back the column ID from m_arrExpListColInfo
EXPLIST_COLUMN_INVALID MES- Flag to know how many flags there are- how many columns
EXPLIST_COLUMN_TITLE Key (as a String) to get back the column title from m_arrExpListColInfo
EXPLIST_COLUMN_WIDTH Key (as a String) to get back the column width from m_arrExpListColInfo
EXPLIST_SORTEDARRAY_PROPID_INDEX We are defining here a column ID for the Growable Sorted Array objects. This column has to reflect the position of the row in the list. Methods to implement the move up, down, first and last actions are already implemented in this class and are ready to be used. However they will work only if the column ID below exists in the object array.
MAX_ROWS Max number of items per page.
MOVEACTION_DOWN Will move the corresponding item one row down.
MOVEACTION_FIRST Will move the corresponding item to the top of the list.
MOVEACTION_LAST Will move the corres ponding item to the bottom of the list.
MOVEACTION_UP Will move the corresponding item one row up.

Public Instance Fields

m_asOwner (inherited from EditorHelperModel) Associated Activity Space.
m_nNextIndex To keep track of the next available index. This index is incremented each time a row is added to the list.

Public Instance Methods

AddRowsOnRepost 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.
CleanupAllData (inherited from EditorHelperModel) 
CleanupTempData (inherited from EditorHelperModel) 
Create (inherited from EditorHelperModel) This method is used by the ASManager to return new instances of managed objects.
DeleteRowsOnRepost Gets the array of checked rows and delete them from the list.
DisableAddButton DCA - Choose not to display add button
DisableCheckBoxes DCA - Disable check boxes.
EnablePagination Enables the pagination.
Equals (inherited from Object)Determines whether the specified Object is equal to the current Object.
GetAddIcon Returns icon for the add action.
GetAddIconAlt Returns the alt text for the add icon.
GetAddLabel Returns the String to display next to the add icon.
GetAlertMessageForEmptyList Returns the message to display by the JavaScript when the list is empty.
GetArrayOfObjToDelete ROB: Make the available for other models.
GetArrExpListColInfo Returns the array of column titles, associated column IDs and column width.
GetCurrentLowerObjectCount 
GetCurrentUpperObjectCount 
GetDeleteIcon Returns icon for the delete action.
GetDeleteIconAlt Returns the alt text for the delete icon.
GetDelRowConfirmMsg JF- Returns the confirmation message to display when the user tries to delete a row.
GetEmptyListInstructions Returns the secondary String to display when the String is empty. (Should give instructions to the user on what to do).
GetEmptyListMainMessage Returns the main String to diplay when the list is empty.
GetEnableMoveRowActions Returns true if the move up and down buttons should be displayed. (use GetHTMLForMoveRowActions in ExpListView to dsiplay the HTMl on each row)
GetHashCode (inherited from Object)Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table.
GetIsListReadOnly Returns the value of the m_bIsReadOnly member variable. If this is true, the user will not be able to perform any action on the list.
GetItems Returns the array of data.
GetListKey Returns the key of the expandable list. (This key is used to avoid conflicts when there are multiple lists on the same page.)
GetMainColumnSort Returns the column ID of the primary sorted column. (the array can be sorted by multiple columns)
GetMainColumnSortDirection Returns the sort direction of the primary sorted column.
GetModelStorageName Returns the storage key of this Model.
GetName (inherited from EditorHelperModel) Returns the Class name.
GetNumObjects 
GetPaginationSize 
GetReadOnlyItems Returns a read-only interface of the data.
GetSectionTitle Returns the section title.
GetTableInstructions JF- Returns table intructions
GetType (inherited from Object)Gets the Type of the current instance.
GetUniqueInt Creates dynamically a unique int and returns it. This method can be used for repost actions for example. This is to make sure that if there are more than one expandable list on the same dislpay page, there won't be any conflict between the two lists.
GetUniqueString Creates dynamically a unique name with the list key and returns it. This is to make sure that if there are more than one expandable list on the same dislpay page, there won't be any conflict between the two lists. This method should be used to create unique input names. It can also be used for JavaScript function names (other than postToSelf - for this one you just need to use the GetUniqueInt method to make sure your repost actions and other int values are unique).
GetUnusedProperties 
GetWrapColumnHeaders JF- Returns the wrap attribute for the column headers.
Init (inherited from EditorHelperModel) Inits the Model with the Activity Space.
InitializeExpandableList Initializes the expandable list.
InitializeReadOnlyExpandableList Initializes the read-only expandable list.
InitializeSortedArray Will be called when this class is initalized. Should take care of initializing _saData (calling Initialize).
IsAddButtonDisabled DCA - Check if add button is to be displayed
IsCheckBoxesDisabled DCA - Check to see if check boxes has been disabled.
IsPaginationEnabled Returns true if the pagination is enabled for this expandable list.
ModifyRow Action for modifying a row
MoveRow Gets the row index back and the move action back. Then perform the associated action.
ReverseCurrentSort Reverses the sort of the primary sorted column.
SaveSection Saves the data when a repost occurs. Editors using this framework need to call that method from the savePage method of the main Model.
SetAddIcon The delete icon will be set by default to add.gif. Use that method if you want to change it.
SetAddIconAlt Sets the value of the alt text for the add icon. This is optional, by default this is set to empty String.
SetDeleteIcon The delete icon will be set by default to delete.gif. Use that method if you want to change it.
SetDeleteIconAlt Sets the value of the alt text for the delete icon. This is optional, by default this is set to empty String.
SetDelRowConfirmMsg JF- Sets the confirmation message to display when the user tried to delete a row.
SetEmptyListMessages Sets messages to display when the list is empty.
SetEnableEmptyListClientValidation Enable the JavaScript validation to ensure that the list is not empty. The String in argument will be displayed by the JavaScript alert. And the String returned is the JavaScript name that should be registered for validation in the Editor. The name returned will be prefixed with the Expandable List key to avoid conflicts.
SetEnableMoveRowActions Set this flag to true if you want to display the move up and down buttons at the end of each row. Warning: if this is set to true, then the sort by column will NOT be available anymore.
SetIsListReadOnly Changes the value of the m_bIsReadOnly member variable. If the list is read only, no action will be displayed in the action bar.
SetListKey Sets a new value for this list key.
SetPagination 
SetSectionTitle Sets the section title.
SetTableInstructions JF- Sets table intructions.
SetWrapColumnHeaders JF- Sets the wrap cell attribute for the column headers. Is true by default.
SortByColumn Gets the column ID back from the form data and resort the array by that column ID, ascending.
ToString (inherited from Object)Returns a String that represents the current Object.

Protected Instance Constructors

ExpListModel Constructor Initializes a new instance of the ExpListModel class.

Protected Instance Fields

m_arrExpListColInfo Array of column titles, associated column IDs and column width
m_bAddButtonDisabled DCA - Variable to show add button or not.
m_bCheckBoxesDisabled DCA - Variable to show check boxes or not.
m_bEnableMoveRowActions Set this flag to true if you want to display the move up and down buttons at the end of each row. Warning: if this is set to true, then the sort by column will NOT be available anymore. You can't have both it doesn't make sense.
m_bIsReadOnly Special mode to have a read-only expandable list: all actions are hidden.
m_bWrapColumnHeaders JF- Wrap attribute for the column headers
m_imgAddIcon The add icon.
m_imgDeleteIcon The delete icon.
m_nListKey This key is used when there is more than one expandable list on the same Display Page.
m_saData This is where we store the data displayed on the list. We are taking advantage of the sorting features offered by the Array Wrapper framework.
m_sAddIconAlt Alt text for the add icon.
m_sAddLabel Text to display next to the add icon.
m_sDeleteIconAlt Alt text for the delete icon.
m_sDelRowConfirmMsg JF- COnfirmation message to display when the user deletes a row.
m_sEmptyListAlert Message to display as a JavaScript alert if the list is empty.
m_sInstructions Instructions to display when the list is empty.
m_sMainMessage Main message to display when the list is empty (in red).
m_sSectionTitle The section main title.
m_sTableInstructions JF- List instructions.
parent Associated AS class

Protected Instance Methods

Finalize (inherited from Object)Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
GetMoveAction Helper method to retrieve the move action type from the form data.
GetRowIndex Helper method to retrieve the row index from the form data.
MemberwiseClone (inherited from Object)Creates a shallow copy of the current Object.
MoveDown Moves the row identified by the index in argument, one row down. The idea is that we are going to change the value of the index column. We just need to swap that value with the one of the row just after.
MoveFirst Moves the row identified by the index in argument, to the top of the list.
MoveLast Moves the row identified by the index in argument, to the last position of the list.
MoveUp Moves the row identified by the index in argument, one row up. The idea is that we are going to change the value of the index column. We just need to swap that value with the one of the previous row.
SaveRow 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.

See Also

ExpListModel Class | com.plumtree.uiinfrastructure.expandablelist Namespace