OverviewSingleDeprecated

jsx3.gui

class Grid

Object
->jsx3.lang.Object
  ->jsx3.app.Model
    ->jsx3.gui.Painted
      ->jsx3.gui.Block
        ->jsx3.gui.List
          ->jsx3.gui.Grid

All Implemented Interfaces:

jsx3.gui.Form, jsx3.gui.Interactive, jsx3.util.EventDispatcher, jsx3.xml.CDF, jsx3.xml.Cacheable

class Grid
extends jsx3.gui.List
Deprecated. Use jsx3.gui.Matrix instead.
The jsx3.gui.Grid class is a subclass of the jsx3.gui.List class. It inherits all its features except that its selection model is cell-based, not row-based. Grids also support 'edit-masks' for complex real-time edits to the grid's values.

See Also:

jsx3.gui.Matrix

Field Summary
static String
DEFAULTBACKGROUND
background-image:url(JSX/images/list/grid.gif);
static String
DEFAULTBACKGROUNDCOLOR
#c8cfd8
static String
DEFAULTBACKGROUNDCOLORHEAD
#c8cfd8
static String
DEFAULTBACKGROUNDHEAD
background-image:url(JSX/images/list/header.gif);
static String
DEFAULTROWCLASS
jsx30list_r2
static String
DEFAULTXSLURL
static String
SELECTBGIMAGE
url(JSX/images/grid/select.gif)
Constructor Summary
void
init(strName : String)
instance initializer
Method Summary
void
doExecute(strRecordId : String, intColumnIndex : ?)
Deprecated.
int
validates the Grid; if the Grid is set to 'required', a selection must be made to pass validation.
String
Returns name of attribute that is mapped to the cell being edited (as defined by jsxpath property for the column containing the cell).
HTMLElement
Returns a handle to the active TD for the grid.
jsx3.app.Model
Returns a handle to the active Mask for the grid.
HTMLElement
Returns a handle to the active TR for the grid.
String
Returns CSS class to use for each repeating TR in the Grid.
String
Returns jsxid attribute for the CDF record selected in the view.
boolean
Returns whether the grid will listen (true) for the tab key and advance cursor focus to the next cell in the grid
static String
Deprecated.
jsx3.xml.Document
Returns XSLT for the Grid, prioritizing the acquisition in the following order: 1) check cache; 2) check jsxxsl; 3) check jsxxslurl; 4) use default
String
Returns the DHTML, used for this object's on-screen VIEW
void
redrawRecord(strRecordId : String, ACTION : int)
reset the mask if necessary before repainting the given row
void
takes the active mask and puts at 0,0; sets visibility to hidden
jsx3.gui.Grid
setTabListener(bBOOLEAN : boolean)
ets whether the grid will listen (true) for the tab key and advance cursor focus to the next cell in the grid.
Methods Inherited From jsx3.gui.List
appendRow, clearXSL, deselectAllRecords, deselectRecord, deselectRecords, doClearSelections, doDeselect, doSelect, doSort, executeRecord, focusRecord, getAutoExpand, getBackgroundColorHead, getBackgroundHead, getCanReorder, getCanResize, getCanSort, getGrowBy, getHeaderHeight, getMultiSelect, getResizable, getResizeable, getSelectedIds, getSelectedNodes, getSortColumn, getSortDirection, getSortPath, getSortType, getValue, getWrap, isSelected, repaintBody, repaintHead, revealRecord, selectRecord, setAutoExpand, setBackgroundColorHead, setBackgroundHead, setCanReorder, setCanResize, setCanSort, setGrowBy, setHeaderHeight, setMultiSelect, setResizable, setResizeable, setSortColumn, setSortDirection, setSortPath, setSortType, setValue, setWrap, updateRow
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, insertRecord, insertRecordBefore, insertRecordNode, insertRecordProperty, reloadFromSource
Methods Inherited From jsx3.gui.Block
getBackground, getBackgroundColor, getBorder, getCDFAttribute, getCDFId, getCSSOverride, 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, getDynamicProperty, getRendered, insertHTML, onAfterPaint, onAfterRestoreView, paintChild, paintChildren, recalcBox, removeAttribute, removeAttributes, repaint, setAttribute, setDynamicProperty
Methods Inherited From jsx3.app.Model
adoptChild, doClone, findAncestor, findDescendants, getAncestorOfName, getAncestorOfType, getChild, getChildIndex, getChildren, getDescendantOfName, getDescendantsOfType, getFirstChild, getFirstChildOfType, getHelpId, getId, getLastChild, getLoadType, getMetaValue, getNS, getName, getNextSibling, getParent, getPersistence, getPreviousSibling, getServer, getUriResolver, insertBefore, load, loadAndCache, loadXML, onAfterAssemble, onAfterAttach, onBeforeAssemble, onChangeServer, onDestroy, onRemoveChild, onSetChild, onSetParent, removeChild, removeChildren, setChild, setHelpId, setLoadType, setMetaValue, setName, setPersistence, toString, toXML, toXMLDoc
Methods Inherited From jsx3.util.EventDispatcher
publish, subscribe, unsubscribe, unsubscribeAll
Methods Inherited From jsx3.lang.Object
clone, equals, eval, getClass, getInstanceOf, getInstanceOfClass, getInstanceOfPackage, instanceOf, isInstanceOf, isSubclassOf, jsxmix, jsxsuper, jsxsupermix, setInstanceOf
Field Detail

DEFAULTBACKGROUND

static String DEFAULTBACKGROUND
background-image:url(JSX/images/list/grid.gif);

DEFAULTBACKGROUNDCOLOR

static String DEFAULTBACKGROUNDCOLOR
#c8cfd8

DEFAULTBACKGROUNDCOLORHEAD

static String DEFAULTBACKGROUNDCOLORHEAD
#c8cfd8

DEFAULTBACKGROUNDHEAD

static String DEFAULTBACKGROUNDHEAD
background-image:url(JSX/images/list/header.gif);

DEFAULTROWCLASS

static String DEFAULTROWCLASS
jsx30list_r2

DEFAULTXSLURL

static String DEFAULTXSLURL

SELECTBGIMAGE

static String SELECTBGIMAGE
url(JSX/images/grid/select.gif)
Constructor Detail

init

void init(strName : String)
instance initializer

Parameters:

strNameunique name distinguishing this object from all other JSX GUI objects in the JSX application
Method Detail

doExecute

void doExecute(strRecordId : String, intColumnIndex : ?)
Deprecated.
executes any bound code for the record, @strRecordId (assuming an @strRecordId is passed); follows this execution event specific to the given record with the execution event bound to the List instance called by the system when the data rows receive a dblclick or enter key event; otherwise can be called by the developer to exectue the code specific to @strRecordId followed by the execute event for the list in general If this method is called by an 'enterkey' event or if no record id is passed, it is assumed that all elements that are selected in the list will have their execution events run

Parameters:

strRecordId'jsxid' value for the record node (according to the CDF) to execute
intColumnIndex

Overrides:

doExecute in jsx3.gui.List

doValidate

int doValidate()
validates the Grid; if the Grid is set to 'required', a selection must be made to pass validation. Otherwise, a Grid will always pass validation

Returns:

one of: jsx3.gui.Form.STATEINVALID or jsx3.gui.Form.STATEVALID  

Overrides:

doValidate in jsx3.gui.List

getActiveAttribute

String getActiveAttribute()
Returns name of attribute that is mapped to the cell being edited (as defined by jsxpath property for the column containing the cell).

Returns:

name of attribute or null  

getActiveCell

HTMLElement getActiveCell()
Returns a handle to the active TD for the grid.

Returns:

 

getActiveMask

jsx3.app.Model getActiveMask()
Returns a handle to the active Mask for the grid.

Returns:

 

getActiveRow

HTMLElement getActiveRow()
Returns a handle to the active TR for the grid.

Returns:

 

Overrides:

getActiveRow in jsx3.gui.List

getClassName

String getClassName()
Returns CSS class to use for each repeating TR in the Grid. Default: jsx3.gui.Grid.DEFAULTROWCLASS. (Using the default class generates a fixed-height row (20px) that overlays the default background (an alternating row color defined by the jsxbg default, jsx3.gui.Grid.DEFAULTBACKGROUND).)

Returns:

valid CSS class to apply to an HTML TR element  

Overrides:

getClassName in jsx3.gui.Block

getSelectedId

String getSelectedId()
Returns jsxid attribute for the CDF record selected in the view.

Returns:

jsxid or null  

getTabListener

boolean getTabListener()
Returns whether the grid will listen (true) for the tab key and advance cursor focus to the next cell in the grid

Returns:

one of: jsx3.Boolean.TRUE or jsx3.Boolean.FALSE  

getVersion

static String getVersion()
Deprecated.
Returns the release/build for the class (i.e., "2.2.00")

Returns:

 

getXSL

jsx3.xml.Document getXSL()
Returns XSLT for the Grid, 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:

getXSL in jsx3.gui.List

paint

String paint()
Returns the DHTML, used for this object's on-screen VIEW

Returns:

DHTML  

Overrides:

paint in jsx3.gui.List

redrawRecord

void redrawRecord(strRecordId : String, ACTION : int)
reset the mask if necessary before repainting the given row

Parameters:

strRecordId'jsxid' value for the record node (according to the CDF) to redraw
ACTIONOne of the following values: jsx3.xml.CDF.INSERT, jsx3.xml.CDF.DELETE, jsx3.xml.CDF.UPDATE

Overrides:

redrawRecord in jsx3.gui.List

resetMask

void resetMask(objMask : jsx3.app.Model)
takes the active mask and puts at 0,0; sets visibility to hidden

Parameters:

objMaskJSX GUI object to reset; if not passed, the class will try determine the active mask and, if found, reset it

setTabListener

jsx3.gui.Grid setTabListener(bBOOLEAN : boolean)
ets whether the grid will listen (true) for the tab key and advance cursor focus to the next cell in the grid. Default: True

Parameters:

bBOOLEANone of: jsx3.Boolean.TRUE or jsx3.Boolean.FALSE

Returns:

this object