Yahoo! UI Library

datatable  3.3.0

Yahoo! UI Library > datatable > DataTable.Base
Search:
 
Filters

Class DataTable.Base - extends Widget

Base class for the DataTable widget.

Constructor

DataTable.Base ( )

Properties

_msgNode - private Y.Node

Pointer to message display node.

_tbodyNode - private Y.Node

Pointer to TBODY node.

_theadNode - private Y.Node

Pointer to THEAD node.

NAME - static final String

Class name.

tdTemplate - String

Tokenized markup template for TD node creation.
Default Value: '
{value}
'

thTemplate - String

Tokenized markup template for TH node creation.
Default Value: '
{value}
'

Properties inherited from Plugin.Host:

Properties inherited from Attribute:

Properties inherited from Base:

Methods

_addCaptionNode

protected void _addCaptionNode ( tableNode )
Creates and attaches CAPTION element to given container.
Parameters:
tableNode <Y.Node> Parent node.

_addColgroupNode

protected void _addColgroupNode ( tableNode )
Creates and attaches COLGROUP element to given TABLE.
Parameters:
tableNode <Y.Node> Parent node.

_addMessageNode

protected void _addMessageNode ( tableNode )
Creates and attaches message display element to given container.
Parameters:
tableNode <Y.Node> Parent node.

_addTableNode

protected void _addTableNode ( containerNode )
Creates and attaches TABLE element to given container.
Parameters:
containerNode <Y.Node> Parent node.

_addTbodyNode

protected void _addTbodyNode ( tableNode )
Creates and attaches TBODY element to given container.
Parameters:
tableNode <Y.Node> Parent node.

_addTbodyTdNode

protected void _addTbodyTdNode ( o )
Creates and attaches data cell element.
Parameters:
o <Object} {record, column, tr> .

_addTbodyTrNode

protected void _addTbodyTrNode ( o )
Creates and attaches data row element.
Parameters:
o <Object} {tbody, record>

_addTheadNode

protected void _addTheadNode ( tableNode )
Creates and attaches THEAD element to given container.
Parameters:
tableNode <Y.Node> Parent node.

_addTheadThNode

protected void _addTheadThNode ( o )
Creates and attaches header cell element.
Parameters:
o <Object} {value, column, tr> .

_addTheadTrNode

protected void _addTheadTrNode ( o , isFirst )
Creates and attaches header row element.
Parameters:
o <Object} {thead, columns> .
isFirst <Boolean> Is first row.
isFirst <Boolean> Is last row.

_afterCaptionChange

protected void _afterCaptionChange ( e )
Updates the UI if caption is changed.
Parameters:
e <Event> Custom event for the attribute change.

_afterColumnsetChange

protected void _afterColumnsetChange ( e )
Updates the UI if Columnset is changed.
Parameters:
e <Event> Custom event for the attribute change.

_afterRecordsetChange

protected void _afterRecordsetChange ( e )
Updates the UI if Recordset is changed.
Parameters:
e <Event> Custom event for the attribute change.

_afterSummaryChange

protected void _afterSummaryChange ( e )
Updates the UI if summary is changed.
Parameters:
e <Event> Custom event for the attribute change.

_attachTbodyTdNode

protected void _attachTbodyTdNode ( o )
Attaches data cell element.
Parameters:
o <Object} {record, column, tr, headers, classnames, value> .

_attachTbodyTrNode

protected void _attachTbodyTrNode ( o )
Attaches data row element.
Parameters:
o <Object} {tbody, record, tr> .

_attachTheadThNode

protected void _attachTheadThNode ( o )
Attaches header cell element.
Parameters:
o <Object} {value, column, tr> .

_attachTheadTrNode

protected void _attachTheadTrNode ( o )
Attaches header row element.
Parameters:
o <Object} {thead, columns, tr> .

_createTbodyTdNode

protected void _createTbodyTdNode ( o )
Creates data cell element.
Parameters:
o <Object} {record, column, tr> .

_createTbodyTrNode

protected void _createTbodyTrNode ( o )
Creates data row element.
Parameters:
o <Object} {tbody, record>

_createTheadThNode

protected void _createTheadThNode ( o )
Creates header cell element.
Parameters:
o <Object} {value, column, tr> .

_createTheadTrNode

protected void _createTheadTrNode ( o , isFirst , isLast )
Creates header row element.
Parameters:
o <Object} {thead, columns> .
isFirst <Boolean> Is first row.
isLast <Boolean> Is last row.

_setColumnset

private void _setColumnset ( columns )
Converts Array to Y.Columnset.
Parameters:
columns <Array | Y.Columnset>

_setRecordset

private void _setRecordset ( records )
Converts Array to Y.Recordset.
Parameters:
records <Array | Y.Recordset>

_uiSetCaption

protected void _uiSetCaption ( val )
Updates caption.
Parameters:
val <String> New caption.

_uiSetColumnset

protected void _uiSetColumnset ( cs )
Updates THEAD.
Parameters:
cs <Y.Columnset> New Columnset.

_uiSetRecordset

protected void _uiSetRecordset ( rs )
Updates TBODY.
Parameters:
rs <Y.Recordset> New Recordset.

_uiSetSummary

protected void _uiSetSummary ( val )
Updates summary.
Parameters:
val <String> New summary.

bindUI

private void bindUI ( )
Binds events.

destructor

private void destructor ( )
Destructor.

formatDataCell

void formatDataCell ( )
Returns markup to insert into data cell element.

initializer

private void initializer ( config )
Initializer.
Parameters:
config <Object> Config object.

renderUI

private void renderUI ( )
Renders UI.

syncUI

private void syncUI ( )
Syncs UI to intial state.

Events

captionChange

captionChange ( event )
Fires when the value for the configuration attribute 'caption' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event <Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

columnsetChange

columnsetChange ( event )
Fires when the value for the configuration attribute 'columnset' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event <Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

recordsetChange

recordsetChange ( event )
Fires when the value for the configuration attribute 'recordset' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event <Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

summaryChange

summaryChange ( event )
Fires when the value for the configuration attribute 'summary' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event <Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

tdValueTemplateChange

tdValueTemplateChange ( event )
Fires when the value for the configuration attribute 'tdValueTemplate' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event <Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

thValueTemplateChange

thValueTemplateChange ( event )
Fires when the value for the configuration attribute 'thValueTemplate' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event <Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

trTemplateChange

trTemplateChange ( event )
Fires when the value for the configuration attribute 'trTemplate' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event <Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

Configuration Attributes

caption - String

Caption

columnset - Array | Y.Columnset

Pointer to Columnset instance.

recordset - Array | Y.Recordset

Pointer to Recordset instance.

summary - String

Summary.

tdValueTemplate - String

Tokenized markup template for TD value.
Default Value: '{value}'

thValueTemplate - String

Tokenized markup template for TH value.
Default Value: '{value}'

trTemplate - String

Tokenized markup template for TR node creation.
Default Value: ''

Configuration attributes inherited from Base:


Copyright © 2011 Yahoo! Inc. All rights reserved.