Page History
...
Code Block | ||
---|---|---|
| ||
myFoundset: { serverSize: 44, // the size of the foundset on server (so not necessarily the total record count in case of large DB tables) // this is the data you need to have loaded on client (just request what you need via provided loadRecordsAsync or loadExtraRecordsAsync) viewPort: { startIndex: 15, size: 5, rows: [ { _svyRowId: 'someRowIdHASH1', name: "Bubu", type: 2 }, { _svyRowId: 'someRowIdHASH2', name: "Ranger", type: 1 }, { _svyRowId: 'someRowIdHASH3', name: "Yogy", type: 2 }, { _svyRowId: 'someRowIdHASH4', name: "Birdy", type: 3 }, { _svyRowId: 'someRowIdHASH5', name: "Wolfy", type: 4 } ], /** Request a change of viewport bounds from the server; the requested data will be loaded asynchronously in 'viewPort' * @param startIndex the index that you request the first record in "viewPort.rows" to have in the real foundset (so the beginning of the viewPort). * @param size the number of records to load in viewPort. */ loadRecordsAsync: function(startIndex, size), /** Request more records for your viewPort; if the argument is positive more records will be loaded at the end of the 'viewPort', when negative more records will be loaded at the beginning of the 'viewPort' - asynchronously. * @param negativeOrPositiveCount the number of records to extend the viewPort.rows with before or after the current loaded records. */ loadExtraRecordsAsync: function(negativeOrPositiveCount), /** * Sort the foundset by the dataproviders contained in sortColumns. * @param {JSONArray} sortColumns an array of JSONObjects {name:dataprovider, direction:sortDirection}, * where the sortDirection can be "asc" or "desc". */ sort: function(sortColumns) }, selectedRowIndexes: [16], // array of selected records in foundset; indexes can be out of current viewPort as well multiSelect: false // the multiselect mode of the server's foundset; if this is false, selectedRowIndexes can only have one item in it } |
...
Overview
Content Tools
Activity