com.plumtree.portalpages.admin.sendinvitation
Class InvCodesListModel

java.lang.Object
  extended by com.plumtree.uiinfrastructure.editor.EditorHelperModel
      extended by com.plumtree.uiinfrastructure.expandablelist.ExpListModel
          extended by com.plumtree.portalpages.admin.sendinvitation.InvCodesListModel
All Implemented Interfaces:
IInvCodeListModelRO, IManagedObject, IModel, IModelRO, IMVCObject, IExpListModelRO, IPaginationModel, IPaginationModelRO

public class InvCodesListModel
extends ExpListModel
implements IInvCodeListModelRO

Author:
DustinA

Field Summary
static java.lang.String CONTROLARGUMENT_OBJECTID
           
static int INVEXPLIST_COL_CODE
           
static int INVEXPLIST_COL_EXPR
           
static int INVEXPLIST_COL_MAX
           
static int INVEXPLIST_COL_NAME
           
static int INVEXPLIST_COL_NUMOFINV
           
static int INVEXPLIST_DEFAULT_INITIAL_SIZE
          Default initial size for the sorted array.
protected  boolean m_bInvObj
           
protected  PTImageType m_imgRowIcon
          Icon to display on each row, just before the input text.
protected  int m_nInvitationID
           
protected  int m_nInvNoi
           
protected  IPTInvitation m_objInv
           
protected  java.lang.String m_strCurrentInvCode
           
protected  java.lang.String m_strInvName
           
static java.lang.String STR_MVC_CLASS_NAME
           
 
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
InvCodesListModel()
           
 
Method Summary
 void AddRows()
          Creates a new Invitation Code
 void AddRowsOnRepost(XPHashtable _htFormData)
          Will be called each time the add action is performed.
 java.lang.String AddRowsOnRepost(XPHashtable _htFormData, int _nDummy)
          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.
 boolean CreateNewInvLink(java.lang.String _strInvName, int _nInvNoi, XPDateTime _dInvExpr)
          Creates a new Invitation Code
 JSDatePickerMgr GetDatePickerControlManager()
          Get the Date picker control manager
 java.lang.String GetInvitationCode()
          Gets the invitation ID to the invitation wanted
 java.lang.String GetInvitationCodeName()
          Returns the m_strInvName.
 int GetInvitationID()
          Gets the invitation ID to the invitation wanted
 boolean GetInvObjectStatus()
          Returns the Status of the Invitation Object.
 java.lang.String GetName()
          Returns the Class name.
 java.lang.String GetNumberOfInvitations()
          Returns the m_nInvNoi as a String.
 PTImageType GetRowIcon()
          Returns the icon to display on each row before the input text.
 void Init(AActivitySpace parent)
          Inits the Model with the IPTSession.
 void InitializeDatePickerMgrs()
          This function initializes the manager objects (Page and datetime) for the date pickers
 void InitializeSortedArray(PTGrowableSortedArrayWrapper _saData)
          Will be called when this class is initalized.
 void InitInvitationExpList(java.lang.String _sSectionTitle, java.lang.String _sSectionSubTitle1, java.lang.String _sSectionSubTitle2, java.lang.String _sSectionSubTitle3, PTImageType _imgAddIcon, java.lang.String _sAddLabel, int _nListKey)
          Initializes the expandable list.
protected  int SaveRow(PTGrowableSortedArrayWrapper _saData, int _nRowIndex, XPHashtable _htFormData)
          Will be called each ime there is a repost to save the data on the list.
 int SaveSection(XPHashtable _htFormData)
          Saves the data when a repost occurs.
 void SetInvitationCode(java.lang.String _invCode)
          Sets the invitation ID to the invitation wanted
 void SetInvitationID(int _nInvitationID)
          Sets the invitation ID to the invitation wanted
 void SetRowIcon(PTImageType _imgRowIcon)
          Sets the icon to display on each row before the input text.
 
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, ModifyRow, MoveDown, MoveFirst, MoveLast, MoveRow, MoveUp, ReverseCurrentSort, SetAddIcon, SetAddIconAlt, SetDeleteIcon, SetDeleteIconAlt, SetDelRowConfirmMsg, SetEmptyListMessages, SetEnableEmptyListClientValidation, SetEnableMoveRowActions, SetIsListReadOnly, SetListKey, SetPagination, SetSectionTitle, SetTableInstructions, SetWrapColumnHeaders, SortByColumn
 
Methods inherited from class com.plumtree.uiinfrastructure.editor.EditorHelperModel
CleanupAllData, CleanupTempData
 
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
 

Field Detail

STR_MVC_CLASS_NAME

public static final java.lang.String STR_MVC_CLASS_NAME
See Also:
Constant Field Values

INVEXPLIST_COL_MAX

public static final int INVEXPLIST_COL_MAX
See Also:
Constant Field Values

INVEXPLIST_COL_NAME

public static final int INVEXPLIST_COL_NAME
See Also:
Constant Field Values

INVEXPLIST_COL_NUMOFINV

public static final int INVEXPLIST_COL_NUMOFINV
See Also:
Constant Field Values

INVEXPLIST_COL_EXPR

public static final int INVEXPLIST_COL_EXPR
See Also:
Constant Field Values

INVEXPLIST_COL_CODE

public static final int INVEXPLIST_COL_CODE
See Also:
Constant Field Values

CONTROLARGUMENT_OBJECTID

public static final java.lang.String CONTROLARGUMENT_OBJECTID
See Also:
Constant Field Values

INVEXPLIST_DEFAULT_INITIAL_SIZE

public static final int INVEXPLIST_DEFAULT_INITIAL_SIZE
Default initial size for the sorted array.

See Also:
Constant Field Values

m_objInv

protected IPTInvitation m_objInv

m_strInvName

protected java.lang.String m_strInvName

m_nInvNoi

protected int m_nInvNoi

m_imgRowIcon

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


m_strCurrentInvCode

protected java.lang.String m_strCurrentInvCode

m_bInvObj

protected boolean m_bInvObj

m_nInvitationID

protected int m_nInvitationID
Constructor Detail

InvCodesListModel

public InvCodesListModel()
Method Detail

AddRows

public void AddRows()
Creates a new Invitation Code


AddRowsOnRepost

public void AddRowsOnRepost(XPHashtable _htFormData)
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 - Form data

AddRowsOnRepost

public java.lang.String AddRowsOnRepost(XPHashtable _htFormData,
                                        int _nDummy)
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.

Parameters:
_htFormData - Form data

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

CreateNewInvLink

public boolean CreateNewInvLink(java.lang.String _strInvName,
                                int _nInvNoi,
                                XPDateTime _dInvExpr)
Creates a new Invitation Code

Parameters:
_strInvName -
_nInvNoi -
_dInvExpr -

GetInvObjectStatus

public boolean GetInvObjectStatus()
Returns the Status of the Invitation Object.

Specified by:
GetInvObjectStatus in interface IInvCodeListModelRO
Returns:
boolean

GetInvitationCode

public java.lang.String GetInvitationCode()
Gets the invitation ID to the invitation wanted

Specified by:
GetInvitationCode in interface IInvCodeListModelRO
Returns:

GetInvitationID

public int GetInvitationID()
Gets the invitation ID to the invitation wanted


GetName

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

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

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.

Returns:
PTImageType

Init

public void Init(AActivitySpace parent)
Inits the Model with the IPTSession.

Specified by:
Init in interface IModel
Overrides:
Init in class EditorHelperModel
Parameters:
parent -

InitializeDatePickerMgrs

public void InitializeDatePickerMgrs()
This function initializes the manager objects (Page and datetime) for the date pickers


InitInvitationExpList

public void InitInvitationExpList(java.lang.String _sSectionTitle,
                                  java.lang.String _sSectionSubTitle1,
                                  java.lang.String _sSectionSubTitle2,
                                  java.lang.String _sSectionSubTitle3,
                                  PTImageType _imgAddIcon,
                                  java.lang.String _sAddLabel,
                                  int _nListKey)
Initializes the expandable list.

Parameters:
_sSectionTitle - Main title.
_sSectionSubTitle - Sub title
_imgAddIcon - Icon for the add action.
_sAddLabel - Text to display next to the add icon.
_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)
Will be called when this class is initalized. Should take care of initializing _saData (calling Initialize).

Specified by:
InitializeSortedArray in class ExpListModel
Parameters:
_saData -

SaveSection

public int SaveSection(XPHashtable _htFormData)
Saves the data when a repost occurs. Editors using this framework need to call that method from the savePage method of the main Model.

Overrides:
SaveSection in class ExpListModel
Parameters:
_htFormData -
Returns:
int Status for server side validation

SetInvitationCode

public void SetInvitationCode(java.lang.String _invCode)
Sets the invitation ID to the invitation wanted

Parameters:
_invCode -

SetInvitationID

public void SetInvitationID(int _nInvitationID)
Sets the invitation ID to the invitation wanted

Parameters:
__nInvitationID -

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 -

SaveRow

protected int SaveRow(PTGrowableSortedArrayWrapper _saData,
                      int _nRowIndex,
                      XPHashtable _htFormData)
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.

Specified by:
SaveRow in class ExpListModel
Parameters:
_saData -
_nRowIndex -
_htFormData -
_nListKey -
Returns:
int

GetNumberOfInvitations

public java.lang.String GetNumberOfInvitations()
Returns the m_nInvNoi as a String.

Specified by:
GetNumberOfInvitations in interface IInvCodeListModelRO
Returns:
String

GetInvitationCodeName

public java.lang.String GetInvitationCodeName()
Returns the m_strInvName.

Specified by:
GetInvitationCodeName in interface IInvCodeListModelRO
Returns:
String

GetDatePickerControlManager

public JSDatePickerMgr GetDatePickerControlManager()
Get the Date picker control manager

Specified by:
GetDatePickerControlManager in interface IInvCodeListModelRO
Returns:
JSDatePickerMgr



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