public function getListView(&$criteria, $return = false) { $dp = new EActiveDataProvider(get_class($this->model), array( 'criteria' => $criteria, //'pagination' => $this->settings['pagination'], )); //default params $params = array( 'dataProvider'=>$dp, 'pager'=>array( 'id'=>$this->widgetModel->pk.'Pager', 'class'=>'LinkPager', 'htmlOptions'=>array('class'=>'pager'), 'cssFile'=>Yii::app()->baseUrl.'/css/pager.css' ), 'ajaxUpdate'=>true, 'template'=>$this->render('listTemplate', array(), true), 'afterAjaxUpdate' => ModelFactory::getAfterAjaxUpdateFunction($this->category->type), 'beforeAjaxUpdate' => ModelFactory::getBeforeAjaxUpdateFunction($this->category->type), 'category' => $this->category, 'contextWidget' => $this ); try { $res = Y::controller()->widget('ListView', $params, true); } catch (CException $e) { Y::dump($e->__toString()); } if ($return) return $res; else echo $res; }