开发者

Zend_Paginator creating issues in webpage

I am using Zend_Paginator in my web-page, where I get the same records in each page....

For Eg. I got the same 4 records in different pages...?

$page=$this->_getParam('page',1);
$paginator = Zend_Paginator::factory($userDetails);
$paginator->setItemCountPerPage(4);
$paginator->setCurrentPageNumber($page);

$this->view->paginator = $paginator;

What may be the problem?

Please 开发者_高级运维help.....

Thanks in advance.....


If this records you get fro DB, you should make limitPage($page, $rowCount). Or if your data not from DB, you should filtering it by other way. Sorry for my english.


Hard to say with that little information but the most obvious explanation is that $page does not contain what you think it does. In other words, make sure you are actually sending a page parameter in the Request and make sure $page contains that page number.

If you can confirm that the correct page number is passed to setCurrentPageNumber, use a Debugger to step through the program flow to see what happens. Consider upgrading your question with more details then.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜