class List
All Implemented Interfaces:
Direct Known Subclasses:
Deprecated. Use jsx3.gui.Matrix instead.
The jsx3.gui.List class supports sorting, resizing, reordering, selection, discontinuous selection, key and mouse navigation, etc. Its data is accessed via the CDF interface.
See Also:
| Constructor Summary |
|---|
| void | instance initializer |
| Method Summary |
|---|
| void | Appends a new row to the end of the list and adds a corresponding record to the CDF source XML. |
| jsx3.gui.List | Deprecated. use resetXslCacheData() instead. |
| jsx3.gui.List | Deselects all selected CDF records of this list. |
| jsx3.gui.List | Deselects a CDF record of this list. |
| void | Deprecated. use setValue() or deselectAllRecords() instead. |
| void | Deprecated. use setValue() or deselectAllRecords() instead. |
| jsx3.gui.List | Deprecated. use setValue() or deselectRecord() instead. |
| void | Deprecated. use executeRecord() instead. |
| jsx3.gui.List | Deprecated. use setValue() or selectRecord() instead. |
| void | Sorts this list according to the current sort path. |
| int | validates the list; if the list is set to 'required', a selection must be made to pass validation. |
| void | Evaluates the JavaScript code in the jsxexecute attribute of one CDF record of this list. |
| jsx3.gui.List | Gives cursor focus to a row in the list. |
| HTMLElement | Returns a handle to the active TR for the list. |
| int | Deprecated. Replaced by getGrowBy which returns an integer argument rather than a boolean. |
| String | Returns the CSS color for the header row (for example, "#ffffff"). |
| String | Returns the CSS background property for the header row (for example, "background-image:url(abc.gif)"). |
| int | Returns whether the columns in the list can be re-ordered via user interaction. |
| void | Deprecated. Renamed to getResizable. |
| int | Returns whether the list will render with sortable columns. |
| int | Returns whether or not a new row will be appended to the VIEW when a new record is added to the CDF document for the List. |
| int | Returns the height of the header row in pixels. |
| int | Returns the selection type of this list. |
| int | Returns whether columns in this list can be resized. |
| void | Deprecated. Renamed to getResizable. |
| Array<String> | Returns the ids of the selected records of this list. |
| jsx3.util.List<jsx3.xml.Entity> | Returns the collection of selected records. |
| int | Returns the zero-based index of column to sort on. |
| String | Returns the direction (jsx3.gui.List.SORTASCENDING or jsx3.gui.List.SORTDESCENDING) for the sorted column; if no direction specified, ascending is returned |
| String | Returns the selection path for XSLT to use when sorting output. |
| String | Returns the data type to be used for sorting this list. |
| String | Array<String> | Returns the jsxid of the selected record if this list is a single-select list or an array of the the jsxids
of the selected records if this list is a multi-select list. |
| static String | |
| int | Returns whether or not the rows in the grid will support text-wrapping and expand to display their wrapped
content OR be a fixed height. |
| jsx3.xml.Document | Returns xslt for the List, prioritizing the acquisition in the following order: 1) check cache; 2) check jsxxsl; 3) check jsxxslurl; 4) use default |
| boolean | Returns whether or not the given record is selected (true/false) |
| static void | |
| static void | Static function that can be called from XSLT-generated content in a list cell to delete a row from the CDF of a
list instance. |
| static void | provides function that can be called from XSLT-generated content in a list cell. |
| String | Returns the DHTML, used for this object's on-screen VIEW |
| void | List implementation. |
| void | Repaints the body portion of the list (the data rows), retaining the scroll position in the list whereas
repainting the entire list would reset scroll position. |
| void | Repaints the head portion of the list (the header row). |
| void | Reveals a record by scrolling any ancestor blocks as necessary. |
| jsx3.gui.List | Selects a CDF record of this list. |
| void | Deprecated. Replaced by setGrowBy which takes an integer argument rather than a boolean one. |
| jsx3.gui.List | Sets the CSS color for the header row (for example, #ffffff) |
| jsx3.gui.List | Sets the CSS background property (can be a composite of varoius CSS-related bg properties) |
| jsx3.gui.List | Sets whether the columns in the list can be re-ordered via user interaction with the VIEW |
| void | Deprecated. Renamed to setResizable. |
| jsx3.gui.List | Sets whether the list will render with sortable columns. |
| jsx3.gui.List | Sets whether or not a new row will be appended to the VIEW when a new record is added to the CDF document for the List. |
| jsx3.gui.List | Sets the height of the header row in pixels. |
| jsx3.gui.List | Sets the selection type of this list. |
| jsx3.gui.List | Sets whether columns in this list can be resized. |
| void | Deprecated. Renamed to setResizable. |
| jsx3.gui.List | Sets the zero-based index of column to sort on and executes the sort. |
| jsx3.gui.List | Sets the direction (ascending or descending) for the sorted column. |
| jsx3.gui.List | Sets the index for the column that the data will be sorted on;
returns a ref to self; |
| jsx3.gui.List | Sets the data type for the list. |
| jsx3.gui.List | Sets the selected records for this list. |
| jsx3.gui.List | Sets whether or not the rows in the grid will support text-wrapping and expand to display their wrapped content
OR be a fixed height. |
| void | Updates the DHTML (VIEW) for an existing row within a list, circumventing a full table repaint by updating
the row directly. |
| Methods Inherited From jsx3.gui.Form |
|---|
| doKeyBinding, doReset, getDisabledBackgroundColor, getDisabledColor, getEnabled, getKeyBinding, getRequired, getValidationState, setDisabledBackgroundColor, setDisabledColor, setEnabled, setKeyBinding, setRequired, setValidationState |
| Methods Inherited From jsx3.xml.Cacheable |
|---|
| clearXmlData, getNodeSet, getShareResources, getXML, getXMLId, getXMLString, getXMLTransformers, getXMLURL, getXSLId, getXSLParams, getXSLString, getXSLURL, getXmlAsync, getXmlBind, onXmlBinding, removeXSLParam, removeXSLParams, resetCacheData, resetData, resetXmlCacheData, resetXslCacheData, setNodeSet, setShareResources, setSourceXML, setXMLId, setXMLString, setXMLTransformers, setXMLURL, setXSLId, setXSLParam, setXSLString, setXSLURL, setXmlAsync, setXmlBind |
| Methods Inherited From jsx3.xml.CDF |
|---|
| adoptRecord, adoptRecordBefore, convertProperties, deleteRecord, deleteRecordProperty, getRecord, getRecordIds, getRecordNode, getSchema, insertRecord, insertRecordBefore, insertRecordNode, insertRecordProperty, reloadFromSource, setSchema |
| Methods Inherited From jsx3.gui.Block |
|---|
| getBackground, getBackgroundColor, getBorder, getCDFAttribute, getCDFId, getCSSOverride, getClassName, getColor, getCursor, getDimensions, getDisplay, getFontName, getFontSize, getFontWeight, getHeight, getIndex, getLeft, getMargin, getOverflow, getPadding, getRelativePosition, getTagName, getText, getTextAlign, getTip, getTop, getVisibility, getWidth, getZIndex, hideMask, setBackground, setBackgroundColor, setBorder, setCDFAttribute, setCDFId, setCSSOverride, setClassName, setColor, setCursor, setDimensions, setDisplay, setFontName, setFontSize, setFontWeight, setHeight, setIndex, setLeft, setMargin, setOverflow, setPadding, setRelativePosition, setTagName, setText, setTextAlign, setTip, setTop, setVisibility, setWidth, setZIndex, showMask |
| Methods Inherited From jsx3.gui.Interactive |
|---|
| doEvent, getCanDrag, getCanDrop, getCanMove, getCanSpy, getEvent, getEvents, getMenu, hasEvent, registerHotKey, removeEvent, removeEvents, setCanDrag, setCanDrop, setCanMove, setCanSpy, setEvent, setMenu, setSpyStyles, showSpy |
| Methods Inherited From jsx3.gui.Painted |
|---|
| focus, getAbsolutePosition, getAttribute, getAttributes, getRendered, insertHTML, onAfterPaint, onAfterRestoreView, paintChild, paintChildren, recalcBox, removeAttribute, removeAttributes, repaint, setAttribute |
| Methods Inherited From jsx3.app.Model |
|---|
| adoptChild, assembleFromXML, doClone, findAncestor, findDescendants, getAncestorOfName, getAncestorOfType, getChild, getChildIndex, getChildren, getDescendantOfName, getDescendantsOfType, getDynamicProperty, getFirstChild, getFirstChildOfType, getHelpId, getId, getLastChild, getLoadType, getMetaValue, getNS, getName, getNextSibling, getParent, getPersistence, getPreviousSibling, getServer, getUriResolver, insertBefore, load, loadAndCache, loadXML, onAfterAssemble, onAfterAttach, onBeforeAssemble, onChangeServer, onChildAdded, onDestroy, onRemoveChild, onSetChild, onSetParent, removeChild, removeChildren, selectDescendants, setChild, setDynamicProperty, setHelpId, setLoadType, setMetaValue, setName, setPersistence, toString, toXML, toXMLDoc, toXMLElm |
| Methods Inherited From jsx3.lang.Object |
|---|
| clone, equals, eval, getClass, getInstanceOf, getInstanceOfClass, getInstanceOfPackage, instanceOf, isInstanceOf, isSubclassOf, jsxmix, jsxsuper, jsxsupermix, setInstanceOf |
static
String DEFAULTBACKGROUNDCOLOR
static
String DEFAULTBACKGROUNDCOLORHEAD
static
String DEFAULTBACKGROUNDHEAD
background-image:url(JSX/images/list/header.gif);
static
int DEFAULTHEADERHEIGHT
Deprecated.
JSX/xsl/[?fx]/jsx30list.xsl (default)
static final
int NOTSELECTABLE
static
String RESIZEBARBGCOLOR
url(JSX/images/list/select.gif)
static final
String SORTASCENDING
static final
String SORTDESCENDING
instance initializer
Parameters:
strName – unique name distinguishing this object from all other JSX GUI objects in the JSX application
Appends a new row to the end of the list and adds a corresponding record to the CDF source XML. This method
requires that at least one CDF record already be present to use as a master to clone from if the
objMasterRecord parameter is null.
Parameters:
objMasterRecord – JavaScript object containing at least the field jsxid.
strID – if provided this id will be used as the id (jsxid) for objMasterRecord.
If null, a unique, system-generated key will be used.
Deprecated. use resetXslCacheData() instead.
List instances typically start with a baseline, system XSL file which is then extended at run-time to include the output markup specific to the child columns;
calling this method will remove the document from the cache, effectively causing the template to reset; returns ref to self
Returns:
this object
See Also:
Deselects all selected CDF records of this list.
Returns:
this object
Deselects a CDF record of this list. The item will be un-highlighted in the view and the CDF data will be updated
accordingly.
Parameters:
strRecordId – the jsxid of the record to deselect.
Returns:
this object
void deselectRecords()
Deprecated. use setValue() or deselectAllRecords() instead.
Deselects all selected records of this list. This method updates both the model and the view.
See Also:
void doClearSelections()
Deprecated. use setValue() or deselectAllRecords() instead.
Deselects all selected records of this list. This method updates both the model and the view.
See Also:
Deprecated. use setValue() or deselectRecord() instead.
Deselects a given record for the list. Invokes the
SELECT and
CHANGE model events only
under the deprecated 3.0 model event protocol.
Parameters:
strRecordId – 'jsxid' value for the record node (according to the CDF) to select in the DATA MODEL
bVIEW – true if null; if true, the selection state in the VIEW will be updated to reflect the selection within the MODEL
Returns:
this object
See Also:
void doExecute(strRecordId
: String)
Deprecated. use executeRecord() instead.
Executes any bound code for a record of this list specified by the
strRecordId parameter. If this
parameter is omitted the code of any currently selected records is executed. Invokes the
EXECUTE
model event only under the deprecated 3.0 model event protocol.
Parameters:
strRecordId – 'jsxid' value for the record node (according to the CDF) to execute
See Also:
Deprecated. use setValue() or selectRecord() instead.
Selects a given record for the list. Invokes the
SELECT and
CHANGE model events only
under the deprecated 3.0 model event protocol.
Parameters:
strRecordId – 'jsxid' value for the record node (according to the CDF) to select in the DATA MODEL
bVIEW – true if null; if true, the selection state in the VIEW will be updated to reflect the selection within the MODEL
bNoEvent – if true, then don't invoke a selection event
bReveal –
Returns:
this object
See Also:
void doSort(intSortDir
: String)
Sorts this list according to the current sort path. If no sort direction is specified, the value will be toggled.
Parameters:
intSortDir – SORTASCENDING or SORTDESCENDING.
See Also:
validates the list; if the list is set to 'required', a selection must be made to pass validation. Otherwise, a list will always pass validation
Returns:
one of: jsx3.gui.Form.STATEINVALID or jsx3.gui.Form.STATEVALID
Overrides:
void executeRecord(strRecordId
: String)
Evaluates the JavaScript code in the jsxexecute attribute of one CDF record of this list.
Parameters:
strRecordId – the jsxid of the CDF record to execute.
Gives cursor focus to a row in the list.
Parameters:
strRecordId – the jsxid value for the record node (according to the CDF) to give focus to.
Returns:
this object
Returns a handle to the active TR for the list.
Returns:
the JavaScript DOM object or null if no row is active.
Deprecated. Replaced by getGrowBy which returns an integer argument rather than a boolean.
Returns:
jsx3.Boolean.TRUE or jsx3.Boolean.FALSE
See Also:
String getBackgroundColorHead()
Returns the CSS color for the header row (for example, "#ffffff"). If this value is not set (null)
the list will render with the default value of jsx3.gui.List.DEFAULTBACKGROUNDCOLORHEAD.
Returns:
CSS color
Returns the CSS background property for the header row (for example, "background-image:url(abc.gif)").
If this value is not set (null) the list will render with the default value of
jsx3.gui.List.DEFAULTBACKGROUNDHEAD.
Returns:
CSS background property
Returns whether the columns in the list can be re-ordered via user interaction. The default value is
jsx3.Boolean.TRUE.
Returns:
one of: jsx3.Boolean.TRUE or jsx3.Boolean.FALSE
void getCanResize()
Deprecated. Renamed to getResizable.
See Also:
Returns whether the list will render with sortable columns.
Returns:
one of: jsx3.Boolean.TRUE or jsx3.Boolean.FALSE
Returns whether or not a new row will be appended to the VIEW when a new record is added to the CDF document for the List. In the case of a grid, a new row is also appended when the last row in the grid gets cursor focus.
Returns:
jsx3.Boolean.TRUE or jsx3.Boolean.FALSE
Returns the height of the header row in pixels. If this value is not set (null) the list will render with
the default value of jsx3.gui.List.DEFAULTHEADERHEIGHT.
Returns:
Returns the selection type of this list.
Returns:
MULTI, SINGLE, or NOTSELECTABLE.
Returns whether columns in this list can be resized. The default value is jsx3.Boolean.TRUE.
Returns:
jsx3.Boolean.TRUE or jsx3.Boolean.TRUE
void getResizeable()
Deprecated. Renamed to getResizable.
See Also:
Returns the ids of the selected records of this list.
Returns:
JavaScript array of stings
Returns the collection of selected records.
Returns:
Returns the zero-based index of column to sort on.
Returns:
zero-based index of child column
Returns the direction (jsx3.gui.List.SORTASCENDING or jsx3.gui.List.SORTDESCENDING) for the sorted column; if no direction specified, ascending is returned
Returns:
one of: jsx3.gui.List.SORTASCENDING or jsx3.gui.List.SORTDESCENDING
Returns the selection path for XSLT to use when sorting output. Typically this is simply the name of the attribute preceded by '@' (i.e., @jsxtext, @social, @phone, etc); if no value exists (e.g., null), an empty string is returned
Returns:
selection path (xpath / xsl query)
Returns the data type to be used for sorting this list. This value is either the one explicitly set with
setSortType() or the data type of the current sort.
Returns:
jsx3.gui.Column.TYPETEXT or jsx3.gui.Column.TYPENUMBER
Returns the jsxid of the selected record if this list is a single-select list or an array of the the jsxids
of the selected records if this list is a multi-select list.
Returns:
Overrides:
Deprecated.
Returns the release/build for the class (i.e., "2.2.00")
Returns:
Returns whether or not the rows in the grid will support text-wrapping and expand to display their wrapped
content OR be a fixed height. The default value is jsx3.Boolean.TRUE.
Returns:
jsx3.Boolean.TRUE or jsx3.Boolean.FALSE
Returns xslt for the List, prioritizing the acquisition in the following order: 1) check cache; 2) check jsxxsl; 3) check jsxxslurl; 4) use default
Returns:
jsx3.xml.Document instance containing valid XSL stylesheet
Overrides:
Returns whether or not the given record is selected (true/false)
Parameters:
strRecordId – jsxid property for the record to check selection state for
Returns:
Deprecated.
provides function that can be called from XSLT-generated content in a list cell. Allows update of CDF via persistent mask interface (checkbox)
Parameters:
strId – CDF record id (jsxid)
strPropName – CDF attribute name for attribute that stores the value of the checkbox
objGUI – browser checkbox element (what was checked)
bToggle – if true, the checkbox will be toggled via this function and the result will be persisted. if false, the current state of the checkbox will be persisted.
objArray – 2-element JavaScript array. First element contains the value to insert into the CDF for @strPropName if the checkbox is checked. Second element is for unchecked states.
Static function that can be called from XSLT-generated content in a list cell to delete a row from the CDF of a
list instance.
Parameters:
strId – CDF record id (jsxid) for the row to delete.
objGUI – browser element (the hyperlink was clicked) that is contained in the list instance.
provides function that can be called from XSLT-generated content in a list cell. Allows update of CDF via persistent mask interface (radio button); assumes that the nodes in the CDF document have jsxgroupname attributes to distinguish the radio groups
Parameters:
strId – CDF record id (jsxid)
strPropName – CDF attribute name for attribute that stores the value of the radio button
objGUI – browser radio button element
bSelect – if true, the radio button will be forced to a 'selected' state and the result will be persisted. if false, the current state of the radio button will be persisted.
objArray – 2-element JavaScript array. First element contains the value to insert into the CDF for @strPropName if the checkbox is checked. Second element is for unchecked states.
Returns the DHTML, used for this object's on-screen VIEW
Returns:
DHTML
Overrides:
void redrawRecord(strRecordId
: String, intAction
: int)
List implementation.
Parameters:
strRecordId – jsxid value for the record node (according to the CDF) to redraw
intAction – jsx3.xml.CDF.INSERT, jsx3.xml.CDF.DELETE,
or jsx3.xml.CDF.UPDATE.
Overrides:
void repaintBody()
Repaints the body portion of the list (the data rows), retaining the scroll position in the list whereas
repainting the entire list would reset scroll position.
void repaintHead()
Repaints the head portion of the list (the header row).
Note that this method will not change the rendered
height of the header row. Therefore, after the header height is changed programmatically,
repaint()
must be called for the list to render properly.
Reveals a record by scrolling any ancestor blocks as necessary.
Parameters:
strRecordId – the id of the record to reveal
objJSX – if provided, reveal the record up to this visual block; useful if the list is set to overflow:expand and the containing block is set to overflow:scroll
Selects a CDF record of this list. The item will be highlighted in the view and the CDF data will be updated
accordingly. If this list is a multi-select list then this selection will be added to any previous selection.
Parameters:
strRecordId – the jsxid of the record to select.
Returns:
this object
void setAutoExpand(bExpand
: int)
Deprecated. Replaced by setGrowBy which takes an integer argument rather than a boolean one.
Parameters:
bExpand – jsx3.Boolean.TRUE or jsx3.Boolean.FALSE.
See Also:
Sets the CSS color for the header row (for example, #ffffff)
Parameters:
strBGColor – CSS color property
Returns:
this object
Sets the CSS background property (can be a composite of varoius CSS-related bg properties)
Parameters:
strBG – CSS background property
Returns:
this object
Sets whether the columns in the list can be re-ordered via user interaction with the VIEW
Parameters:
intReorder – one of: jsx3.Boolean.TRUE or jsx3.Boolean.FALSE
Returns:
this object
void setCanResize()
Deprecated. Renamed to setResizable.
See Also:
Sets whether the list will render with sortable columns.
Parameters:
SORT – one of: jsx3.Boolean.TRUE or jsx3.Boolean.FALSE
Returns:
this object
Sets whether or not a new row will be appended to the VIEW when a new record is added to the CDF document for the List. In the case of a grid, a new row is also appended when the last row in the grid gets cursor focus.
Parameters:
intGrow – jsx3.Boolean.TRUE or jsx3.Boolean.FALSE
Returns:
this object
Sets the height of the header row in pixels. Set to zero (0) to hide the header row and only render the body
rows for the list.
Parameters:
Returns:
this object
Sets the selection type of this list.
Parameters:
intMulti – MULTI, SINGLE, or NOTSELECTABLE.
Returns:
this object
Sets whether columns in this list can be resized.
Parameters:
BOOLEAN – jsx3.Boolean.TRUE or jsx3.Boolean.TRUE
Returns:
this object
void setResizeable()
Deprecated. Renamed to setResizable.
See Also:
Sets the zero-based index of column to sort on and executes the sort. This method fires the
AFTER_SORT only under the deprecated 3.0 model event protocol.
Parameters:
intColumnIndex – zero-based index of child column
Returns:
this object
Sets the direction (ascending or descending) for the sorted column.
Parameters:
intSortDir – one of: jsx3.gui.List.SORTASCENDING or jsx3.gui.List.SORTDESCENDING
Returns:
this object
Sets the index for the column that the data will be sorted on;
returns a ref to self;
Parameters:
strPath – selection path (xpath / xsl query)
Returns:
this object
Sets the data type for the list. This explicit value will override any column data type if set. If it is not set
the data type specific to the sort column is used for sorting.
Parameters:
strDataType – jsx3.gui.Column.TYPETEXT or jsx3.gui.Column.TYPENUMBER
Returns:
this object
Sets the selected records for this list. This method clears any current selection state and updates both the
view and the model. The strRecordId parameter should be a single value for a single-select list
or a list of values for a multi-select list.
Parameters:
Returns:
this object
Overrides:
Sets whether or not the rows in the grid will support text-wrapping and expand to display their wrapped content
OR be a fixed height.
Parameters:
WRAP – jsx3.Boolean.TRUE or jsx3.Boolean.FALSE
Returns:
this object
void updateRow(strRecordId
: String)
Updates the DHTML (VIEW) for an existing row within a list, circumventing a full table repaint by updating
the row directly.
Parameters:
strRecordId – id for the CDF record whose associated on-screen TR needs to be updated.
Copyright © 2001-2011, TIBCO Software Inc.