existente
(Determinista)
May 18, 2011, 1:48pm
1
I have a problem in the following code:
$dataProvider=new CActiveDataProvider('Obra', array(
'pagination'=>array(
'pageSize'=>6,
)));
$criteria = new CDbCriteria;
$criteria->limit = 4;
$criteria->order = 'fechaSubida DESC';
$dataProvider->setCriteria($criteria);
$this->widget('zii.widgets.CListView', array(
'dataProvider'=>$dataProvider,
'itemView'=>'_view',
));
The problem is that the limit propertie of the criteria is ignored. The listView shows all the records when it should show only four. Is this a bug? am I missing something?
tri
(tri - Tommy Riboe)
May 18, 2011, 1:53pm
2
existente:
I have a problem in the following code:
$dataProvider=new CActiveDataProvider('Obra', array(
'pagination'=>array(
'pageSize'=>6,
)));
$criteria = new CDbCriteria;
$criteria->limit = 4;
$criteria->order = 'fechaSubida DESC';
$dataProvider->setCriteria($criteria);
$this->widget('zii.widgets.CListView', array(
'dataProvider'=>$dataProvider,
'itemView'=>'_view',
));
The problem is that the limit propertie of the criteria is ignored. The listView shows all the records when it should show only four. Is this a bug? am I missing something?
This question was asked earlier today. A solution was proposed here.
/Tommy