Class DataTable.Base
- extends Widget
Base class for the DataTable widget.
Properties
_msgNode
- private Y.Node
Pointer to message display node.
NAME
- static final String
Tokenized markup template for TD node creation.
Tokenized markup template for TH node creation.
Properties inherited from Widget:
Properties inherited from Base:
Methods
protected
void
_addCaptionNode
(
tableNode
)
Creates and attaches CAPTION element to given container.
- Parameters:
-
tableNode
<Y.Node>
Parent node.
protected
void
_addColgroupNode
(
tableNode
)
Creates and attaches COLGROUP element to given TABLE.
- Parameters:
-
tableNode
<Y.Node>
Parent node.
protected
void
_addMessageNode
(
tableNode
)
Creates and attaches message display element to given container.
- Parameters:
-
tableNode
<Y.Node>
Parent node.
protected
void
_addTableNode
(
containerNode
)
Creates and attaches TABLE element to given container.
- Parameters:
-
containerNode
<Y.Node>
Parent node.
protected
void
_addTbodyNode
(
tableNode
)
Creates and attaches TBODY element to given container.
- Parameters:
-
tableNode
<Y.Node>
Parent node.
protected
void
_addTbodyTdNode
(
o
)
Creates and attaches data cell element.
- Parameters:
-
o
<Object} {record, column, tr>
.
protected
void
_addTbodyTrNode
(
o
)
Creates and attaches data row element.
- Parameters:
-
o
<Object} {tbody, record>
protected
void
_addTheadNode
(
tableNode
)
Creates and attaches THEAD element to given container.
- Parameters:
-
tableNode
<Y.Node>
Parent node.
protected
void
_addTheadThNode
(
o
)
Creates and attaches header cell element.
- Parameters:
-
o
<Object} {value, column, tr>
.
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.
protected
void
_afterCaptionChange
(
e
)
Updates the UI if caption is changed.
- Parameters:
-
e
<Event>
Custom event for the attribute change.
protected
void
_afterColumnsetChange
(
e
)
Updates the UI if Columnset is changed.
- Parameters:
-
e
<Event>
Custom event for the attribute change.
protected
void
_afterRecordsetChange
(
e
)
Updates the UI if Recordset is changed.
- Parameters:
-
e
<Event>
Custom event for the attribute change.
protected
void
_afterSummaryChange
(
e
)
Updates the UI if summary is changed.
- Parameters:
-
e
<Event>
Custom event for the attribute change.
protected
void
_attachTbodyTdNode
(
o
)
Attaches data cell element.
- Parameters:
-
o
<Object} {record, column, tr, headers, classnames, value>
.
protected
void
_attachTbodyTrNode
(
o
)
Attaches data row element.
- Parameters:
-
o
<Object} {tbody, record, tr>
.
protected
void
_attachTheadThNode
(
o
)
Attaches header cell element.
- Parameters:
-
o
<Object} {value, column, tr>
.
protected
void
_attachTheadTrNode
(
o
)
Attaches header row element.
- Parameters:
-
o
<Object} {thead, columns, tr>
.
protected
void
_createTbodyTdNode
(
o
)
Creates data cell element.
- Parameters:
-
o
<Object} {record, column, tr>
.
protected
void
_createTbodyTrNode
(
o
)
Creates data row element.
- Parameters:
-
o
<Object} {tbody, record>
protected
void
_createTheadThNode
(
o
)
Creates header cell element.
- Parameters:
-
o
<Object} {value, column, tr>
.
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.
private
void
_setColumnset
(
columns
)
Converts Array to Y.Columnset.
- Parameters:
-
columns
<Array | Y.Columnset>
private
void
_setRecordset
(
records
)
Converts Array to Y.Recordset.
- Parameters:
-
records
<Array | Y.Recordset>
protected
void
_uiSetCaption
(
val
)
Updates caption.
- Parameters:
-
val
<String>
New caption.
protected
void
_uiSetColumnset
(
cs
)
Updates THEAD.
- Parameters:
-
cs
<Y.Columnset>
New Columnset.
protected
void
_uiSetRecordset
(
rs
)
Updates TBODY.
- Parameters:
-
rs
<Y.Recordset>
New Recordset.
protected
void
_uiSetSummary
(
val
)
Updates summary.
- Parameters:
-
val
<String>
New summary.
private
void
bindUI
(
)
Binds events.
private
void
destructor
(
)
Destructor.
void
formatDataCell
(
)
Returns markup to insert into data cell element.
private
void
initializer
(
config
)
Initializer.
- Parameters:
-
config
<Object>
Config object.
private
void
renderUI
(
)
Renders UI.
private
void
syncUI
(
)
Syncs UI to intial state.
Methods inherited from EventTarget:
_getType,
_monitor,
_parseType,
addTarget,
after,
before,
bubble,
detach,
detachAll,
fire,
getEvent,
getTargets,
on,
once,
parseType,
publish,
removeTarget,
subscribe,
unsubscribe,
unsubscribeAll
Methods inherited from Attribute:
_addAttrs,
_addLazyAttr,
_defAttrChangeFn,
_fireAttrChange,
_getAttr,
_getAttrCfg,
_getAttrInitVal,
_getAttrs,
_getStateVal,
_isLazyAttr,
_normAttrVals,
_protectAttrs,
_set,
_setAttr,
_setAttrs,
_setAttrVal,
_setStateVal,
addAttr,
addAttrs,
attrAdded,
get,
getAttrs,
modifyAttr,
removeAttr,
reset,
set,
setAttrs
Methods inherited from Widget:
_applyParsedConfig,
_applyParser,
_bindAttrUI,
_bindDOM,
_bindUI,
_createUIEvent,
_defaultCB,
_defRenderFn,
_destroyUIEvents,
_getHtmlParser,
_getSrcNode,
_getStrings,
_getUIEventNode,
_guid,
_initUIEvent,
_isUIEvent,
_onDocFocus,
_onDocMouseDown,
_removeLoadingClassNames,
_renderBox,
_renderBoxClassNames,
_renderUI,
_setAttrUI,
_setBB,
_setBox,
_setCB,
_setStrings,
_strSetter,
_syncAttrUI,
_syncUI,
_uiSetDim,
_uiSetDisabled,
_uiSetFocused,
_uiSetHeight,
_uiSetTabIndex,
_uiSetVisible,
_uiSetWidth,
_uiSizeCB,
_unbindDOM,
_unbindUI,
_validTabIndex,
bindUI,
blur,
destructor,
disable,
enable,
focus,
getClassName,
getDefaultLocale,
getSkinName,
getString,
getStrings,
hide,
initializer,
render,
renderer,
renderUI,
show,
syncUI,
toString
Methods inherited from Base:
_aggregateAttrs,
_defDestroyFn,
_defInitFn,
_destroyHierarchy,
_filterAttrCfs,
_getAttrCfgs,
_getClasses,
_initHierarchy,
_initHierarchyData,
_preInitEventCfg,
destroy,
init,
toString
Events
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
(
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
(
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
(
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
(
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
(
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
(
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
Events inherited from Widget:
boundingBoxChange,
contentBoxChange,
disabledChange,
focusedChange,
heightChange,
idChange,
localeChange,
renderChange,
renderedChange,
srcNodeChange,
stringsChange,
tabIndexChange,
visibleChange,
widget:contentUpdate,
widget:render,
widthChange,
Events inherited from Base:
Configuration Attributes
columnset
- Array | Y.Columnset
Pointer to Columnset instance.
recordset
- Array | Y.Recordset
Pointer to Recordset instance.
Tokenized markup template for TD value.
Default Value: '{value}'
Tokenized markup template for TH value.
Default Value: '{value}'
Tokenized markup template for TR node creation.
Default Value: '
'
Configuration attributes inherited from Widget:
Configuration attributes inherited from Base: