com.plumtree.portalpages.browsing.editors.dircommon.editdocumentproperty
Class EditCardPropView

java.lang.Object
  extended by com.plumtree.uiinfrastructure.editor.EditorView
      extended by com.plumtree.uiinfrastructure.expandablelist.ExpListView
          extended by com.plumtree.portaluiinfrastructure.expandablelist.properties.ExpListPropBrowseView
              extended by com.plumtree.portaluiinfrastructure.expandablelist.properties.ExpListPropEditView
                  extended by com.plumtree.portalpages.browsing.editors.dircommon.editdocumentproperty.EditCardPropView
All Implemented Interfaces:
IManagedObject, IMVCObject, IView

public class EditCardPropView
extends ExpListPropEditView

This is the implementation of the Expandable List for editing card properties

Author:
stephenc

Field Summary
static java.lang.String HTMLINPUT_SELECT_NEW_PROP
           
static java.lang.String HTMLINPUT_SELECT_NEW_PROP_TAGID
           
static java.lang.String HTMLINPUT_SELECT_PICKLIST_PREFIX
          Prefix for picklist input
static java.lang.String HTMLINPUT_SELECT_PICKLIST_TAGID
          TagID for picklist
static java.lang.String JAVASCRIPT_NEWCARDPROP
           
protected static java.lang.String JAVASCRIPT_PICKTREE_GETVALUE
          JavaScript function to get pick tree value.
protected static java.lang.String JAVASCRIPT_PICKTREE_OPEN
          JavaScript function to open pick tree.
protected  java.lang.String m_strRowHeight
          Height of rows in list
static java.lang.String STR_MVC_CLASS_NAME
          Class name for the activity space
 
Fields inherited from class com.plumtree.portaluiinfrastructure.expandablelist.properties.ExpListPropEditView
HTMLINPUT_ITEM, HTMLINPUT_PASSWORD, INPUT_MAXLENGTH_STRING, INPUT_MAXSIZE_DOUBLE, INPUT_MAXSIZE_LONG, INPUT_MAXSIZE_STRING
 
Fields inherited from class com.plumtree.portaluiinfrastructure.expandablelist.properties.ExpListPropBrowseView
m_rowStyleClass
 
Fields inherited from class com.plumtree.uiinfrastructure.expandablelist.ExpListView
HTMLBUTTON_DELETE, HTMLCHECKBOX_CHECKALL, HTMLCHECKBOX_DELROW, HTMLHIDDEN_COLUMNID, HTMLHIDDEN_MOVEACTION, HTMLHIDDEN_ROWINDEX, HTMLID_EXPLIST, m_nLastVisibleRow
 
Fields inherited from class com.plumtree.uiinfrastructure.editor.EditorView
m_asOwner, m_model, SPACE
 
Constructor Summary
EditCardPropView()
           
 
Method Summary
protected  void AddHTMLToActionBar(HTMLTableRow _myRow)
          Empty method that sub classes can averride to add actions to the action bar (like a create object action).
protected  boolean CheckRowIsRemovable(int _nRowIndex)
          Checks to see if the row can be removed.
 java.lang.Object Create()
          This method is used by the ASManager to return new instances of managed objects.
 HTMLScript DisplayJavascript()
          This method returns the HTMLScript that encompasses the Javascript on the page.
protected  HTMLAnchor GetAddAnchor(int _nRowIndex)
          Returns anchor for add button
protected  HTMLAnchor GetDeleteAnchor(int _nRowIndex)
          Returns anchor for delete button
protected  HTMLTableCell GetHTMLForCheckBox(int _nRowIndex)
          Generates HTML for the checkbox displayed in the UI.
protected  HTMLTableCell GetHTMLForName(IPTGrowableSortedArrayWrapperRO _saData, int _nRowIndex)
           
protected  HTMLElementCollection GetHTMLForPickList(int _nRowIndex, java.lang.String _strValue)
          Returns HTML for pick list
protected  HTMLElement GetHTMLForPickTree(int _nRowIndex, java.lang.String _strValue)
          Returns HTML for pick tree
protected  HTMLTableCell GetHTMLForPropertyValue(int _nRowIndex)
          Returns table cell for property value
 HTMLElement GetHTMLForRow(IPTGrowableSortedArrayWrapperRO _saData, int _nRowIndex)
          Returns the HTML for the row _nRowIndex.
protected  HTMLTableCell GetHTMLForRowAction(int _nRowIndex)
          Returns table cell for adding a value or deleting a value.
 java.lang.String GetName()
          Returns the Class name.
protected  ASURL GetPickTreeURL()
          Return ASURL for pick tree
protected  HTMLSelect GetUnusedPropertiesHTMLSelect()
          Generates a list of properties to be added.
protected  void SetRowStyle(HTMLTableRow _myRow, int _nRowIndex, int _nLastVisibleRow)
          Helper method to set the style of a row.
 
Methods inherited from class com.plumtree.portaluiinfrastructure.expandablelist.properties.ExpListPropEditView
GetHTMLElementForRow, GetHTMLEncryptedInput, GetHTMLForDate, GetHTMLForReferenceTree, GetHTMLTextInput
 
Methods inherited from class com.plumtree.portaluiinfrastructure.expandablelist.properties.ExpListPropBrowseView
CheckRowIsFirstForProperty, SetRowStyle
 
Methods inherited from class com.plumtree.uiinfrastructure.expandablelist.ExpListView
CheckRowIsVisible, Display, GetHiddenInputsForPagination, GetHTMLBelowActionBar, GetHTMLBelowMainTable, GetHTMLForActionBar, GetHTMLForAddAction, GetHTMLForAllRowsAdded, GetHTMLForBottomRow, GetHTMLForDeleteAction, GetHTMLForEmptyCellInActionBar, GetHTMLForEmptyList, GetHTMLForMoveRowActions, GetHTMLForPaginationLinks, GetHTMLForSubHeader, GetJavaScriptsForPagination
 
Methods inherited from class com.plumtree.uiinfrastructure.editor.EditorView
AddEmptyCellToRow, AddEmptyCellToRow, AddEmptyRowToTable, AddEmptyRowToTable, GetHeaderView, GetHeaderViewHelper, GetShortSpacerTable, GetSpacerTable, Init
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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

HTMLINPUT_SELECT_NEW_PROP

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

HTMLINPUT_SELECT_NEW_PROP_TAGID

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

JAVASCRIPT_NEWCARDPROP

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

JAVASCRIPT_PICKTREE_OPEN

protected static final java.lang.String JAVASCRIPT_PICKTREE_OPEN
JavaScript function to open pick tree.

See Also:
Constant Field Values

JAVASCRIPT_PICKTREE_GETVALUE

protected static final java.lang.String JAVASCRIPT_PICKTREE_GETVALUE
JavaScript function to get pick tree value.

See Also:
Constant Field Values

HTMLINPUT_SELECT_PICKLIST_PREFIX

public static final java.lang.String HTMLINPUT_SELECT_PICKLIST_PREFIX
Prefix for picklist input

See Also:
Constant Field Values

HTMLINPUT_SELECT_PICKLIST_TAGID

public static final java.lang.String HTMLINPUT_SELECT_PICKLIST_TAGID
TagID for picklist

See Also:
Constant Field Values

m_strRowHeight

protected java.lang.String m_strRowHeight
Height of rows in list

Constructor Detail

EditCardPropView

public EditCardPropView()
Method Detail

Create

public java.lang.Object Create()
Description copied from class: EditorView
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 EditorView
Returns:
A new instance of the managed class (i.e. return new Foo();)
See Also:
IManagedObject.Create()

DisplayJavascript

public HTMLScript DisplayJavascript()
This method returns the HTMLScript that encompasses the Javascript on the page.

Specified by:
DisplayJavascript in interface IView
Overrides:
DisplayJavascript in class ExpListView
Returns:
HTMLScript
See Also:
IView.DisplayJavascript()

GetHTMLForPickList

protected HTMLElementCollection GetHTMLForPickList(int _nRowIndex,
                                                   java.lang.String _strValue)
Returns HTML for pick list

Parameters:
_nRowIndex - Row index
_strValue - Property value as string
Returns:
HTML for pick list
Throws:
HTMLException

GetHTMLForPickTree

protected HTMLElement GetHTMLForPickTree(int _nRowIndex,
                                         java.lang.String _strValue)
Returns HTML for pick tree

Parameters:
_nRowIndex - Row index
_strValue - Property value as string
Returns:
HTML for pick tree
Throws:
java.lang.Exception

GetHTMLForRow

public HTMLElement GetHTMLForRow(IPTGrowableSortedArrayWrapperRO _saData,
                                 int _nRowIndex)
Returns the HTML for the row _nRowIndex. Each row contains just an icon and input text.

Specified by:
GetHTMLForRow in class ExpListView
Parameters:
_saData -
_nRowIndex -
Returns:
HTMLElement
Throws:
java.lang.Exception

GetHTMLForPropertyValue

protected HTMLTableCell GetHTMLForPropertyValue(int _nRowIndex)
Returns table cell for property value

Parameters:
_nRowIndex - Current row index
Returns:
Table cell for property value
Throws:
java.lang.Exception

GetHTMLForRowAction

protected HTMLTableCell GetHTMLForRowAction(int _nRowIndex)
Returns table cell for adding a value or deleting a value.

Parameters:
_nRowIndex - Current row index
Returns:
Table cell for action
Throws:
java.lang.Exception

CheckRowIsRemovable

protected boolean CheckRowIsRemovable(int _nRowIndex)
Checks to see if the row can be removed.

Parameters:
_nRowIndex - Current row index
Returns:
Returns true if row can be removed. Otherwise returns false.

GetAddAnchor

protected HTMLAnchor GetAddAnchor(int _nRowIndex)
Returns anchor for add button

Parameters:
_nRowIndex - Current row index
Returns:
Anchor for add button
Throws:
java.lang.Exception

GetDeleteAnchor

protected HTMLAnchor GetDeleteAnchor(int _nRowIndex)
Returns anchor for delete button

Parameters:
_nRowIndex - Current row index
Returns:
Anchor for delete button
Throws:
java.lang.Exception

GetName

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

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

AddHTMLToActionBar

protected void AddHTMLToActionBar(HTMLTableRow _myRow)
Empty method that sub classes can averride to add actions to the action bar (like a create object action).

Overrides:
AddHTMLToActionBar in class ExpListView
Parameters:
_myRow - Action bar row object.
Throws:
java.lang.Exception

GetHTMLForCheckBox

protected HTMLTableCell GetHTMLForCheckBox(int _nRowIndex)
Generates HTML for the checkbox displayed in the UI. This checkbox can be used to select the property in the UI. Only one checkbox is displayed for all the values of a Multivalued property that is rendered in the first row of the multivalued property. For multi valued properties selecting checkbox of the first row and clicking on remove button removes all the values of that multi valued property.

Overrides:
GetHTMLForCheckBox in class ExpListView
Parameters:
_nRowIndex -
Returns:
HTML for check box, only if the property is removable and for multivalued properties if it is first property value.
Throws:
HTMLException

GetHTMLForName

protected HTMLTableCell GetHTMLForName(IPTGrowableSortedArrayWrapperRO _saData,
                                       int _nRowIndex)
Parameters:
_saData -
_nRowIndex -
Returns:
Throws:
HTMLException

GetUnusedPropertiesHTMLSelect

protected HTMLSelect GetUnusedPropertiesHTMLSelect()
Generates a list of properties to be added. Only card props that have not been chosen are offered

Returns:
Throws:
HTMLException

SetRowStyle

protected void SetRowStyle(HTMLTableRow _myRow,
                           int _nRowIndex,
                           int _nLastVisibleRow)
Helper method to set the style of a row. This method is used by Display(). Overrides the ExpListView::SetExpListRowStyle().

Parameters:
_myRow -
_nRowIndex -
_nLastVisibleRow -
Throws:
HTMLException
See Also:
com.plumtree.uiinfrastructure.expandablelist.ExpListView#SetExpListRowStyle(HTMLTableRow, int, int)

GetPickTreeURL

protected ASURL GetPickTreeURL()
Return ASURL for pick tree

Returns:
ASURL for pick tree



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