Demonstration of a ChacheTableThe intention of the CacheTable is to have a control able to handle large ammonts of records. It is designed to only need these records that are actually in the visible area of the table. So you dont have to first oad a huge ammont of data (and get long delays). The CacheTable works together with a so called dataProvider. The CacheTable then always asks the dataProvider for the data it actually requires. The dataProvider is an object, that has to offer 2 methods: getData und getIdList. Both methods must take the two arguments from and count. Assuming you defined that one "page" of the CacheTable should have 30 rows (i.e. the listCount is 30), at the beginning the CacheTable will ask the dataProvider for records 0 - 29,calling "getData(0, 30)". The dataProvider has to return the 30 first records. If you scroll down to say position 250 and the CacheTable recognizes that only the records 0 - 260 are already loaded it will call the dataProvider again "getData(260, 20)". In this example the dataProvider just creates recordsets if it`s getData method is called by the table. In a productional environment the getData method will perform a database-query or read a file. So to use a CoreTable you have to
|