function list4Action() { $catalogGuid = $this->_getParam('guid') ? $this->_getParam('guid') : ''; $page = $this->_getParam('page') ? $this->_getParam('page') : 1; //$limit = 25; //$start = $limit * ($page - 1); //sleep(2); //$modelCatalog = new Pandamp_Modules_Dms_Catalog_Model_Catalog(); //$decorator = new Pandamp_BeanContext_Decorator($modelCatalog); //$rowset = $decorator->getCatalogByGuidAsEntity($catalogGuid); //$st = $rowset->getShortTitle(); $modelComment = new Pandamp_Modules_Extension_Comment_Model_Comment(); $decorator = new Pandamp_BeanContext_Decorator($modelComment); $rows = $decorator->getCommentParentByGuidwAjaxAsEntity($catalogGuid, $page); $num_rows = $modelComment->getParentCommentCount($catalogGuid); //$numPage = ceil($num_rows/$limit); //$pagination = ''; //for ($i=1;$i<=$numPage;$i++) //$pagination .= "<li><a href='/berita/baca/$catalogGuid/$st/p/$i' title='Halaman $i' rev='$i'>$i</a></li>"; // check is AJAX request or not //if (!$this->getRequest() -> isXmlHttpRequest()) { //$this->view->pagination = $pagination; //} $paginator = Zend_Paginator::factory($rows); $paginator->setItemCountPerPage(10); $paginator->setCurrentPageNumber($page); $this->view->paginator = $paginator; //$this->view->catalogGuid = $catalogGuid; $this->view->rows = $rows; $this->view->numrows = $num_rows; //$this->view->limit = $limit; }