Class Banana.Controls.DataControl
Defined in: DataControl.js.
Constructor Summary
Method Summary
Constructor Detail
new Banana.Controls.DataControl()
Creates a base data control. Most Data controls in Banana are derived from this base data control.
It adds set/get data support. And as well support to bind to datasets. @see Banana.Data.DataSet
Changes made in controls are automatically redirected to the data property to ensure always up to date data.
Still you can as a user bind on the 'dataChanged' event to listen to data changes.
Depending on the type of the control you can also use dom events to detect changes.
Method Detail
setData(data, ignoreEvent, ignoreDom)
: this
Sets data on control.
when this function is called we also trigger a datachanged event and update the dom.
Parameters:
{mixed} | data | for control |
{boolean} | ignoreEvent | when true no datachanged is triggered. This is useful when you are running in a circle or performance issues. |
{boolean} | ignoreDom | when true setDomData function is not called. Useful in cases of optimizing performance. |
Returns:
{this} |