Fixed correct expanding of names and implemented the dataProvider class

This commit is contained in:
Andreas Stöckel
2011-09-08 18:36:09 +00:00
parent e151398d94
commit 87c0db7be1
19 changed files with 526 additions and 101 deletions

View File

@ -33,3 +33,49 @@ var et2_dataview_IViewRange = new Interface({
setViewRange: function(_range) {}
});
/**
* Interface which objects have to implement, that want to act as low level
* datasource.
*/
var et2_IRowFetcher = new Interface({
/**
* @param _fetchList is an array consisting of objects whith the entries
* "startIdx" and "count"
* @param _callback is the callback which is called when the data is ready
* (may be immediately or deferred). The callback has the following
* signature:
* function (_rows)
* where _rows is an associative array which contains the data for that row.
* @param _context is the context in which the callback should run.
*/
getRows: function(_fetchList, _callback, _context) {}
});
/**
* Interface the data provider has to implement
*/
var et2_IDataProvider = new Interface({
/**
* Returns the total count of grid elements
*/
getCount: function() {},
/**
* Registers the given dataRow for the given index. Calls _dataRow.updateData
* as soon as data is available for that row.
*/
registerDataRow: function(_dataRow, _idx) {},
/**
* Stops calling _dataRow.updateData for the dataRow registered for the given
* index.
*/
unregisterDataRow: function(_idx) {}
});