in my web application I’m using Firebird database, so I’m currently not able to use CActiveRecord class (and other relative classes) implemented in Yii framework. I had to write my own classes to access database.
I had to also override CDataProvider class in order to show my data in CListView widget. But I don’t know how to implement paging in my ListView. My question is: is it possible to use pagination in CListView in this case or what I have to override in order to make it work. Thanks.
CListView fetchs the data from a data provider (an object whose class implements the interface IDataProvider). I never tryed to set the data of a dataprovider directly from an array. I think that the concept of a data provider is the one of an object that can fetch data for his own once configured.
I think that if you have correctly implemented CActiveDataProvided, the pagination should be working. You must set the property pagination when creating the data provider.
Then, the pagination elements should automatically appear when the data items exceeds the constant PAGE_SIZE of the current controller.
I think with the next code it should be working:
// here you create your data provider instance