Ajax Paging/sorting in cakephp 2.0

前端 未结 3 783
广开言路
广开言路 2020-12-22 10:33

I am using cakephp 2.0 and trying to create ajax paging which i cant in the documentation i read that passing this

$this->Paginator->options(
                  


        
3条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-22 11:06

    Actually, there are example in the book here. Look for the Ajax Pagination section. Make sure to follow all of the directions and it'll work.

    You need:

    • The RequestHandler component to be loaded in your controller.
    • The Js Helper to be loaded in your controller.
    • You need to include jQuery in your view/layout.
    • And you need to write the Js buffer ($this->Js->writeBuffer()) in your view/layout. It'd suggest putting this in your view unless you load the Js helper in your AppController because otherwise $this->Js won't be defined.

    The example in the book uses jQuery and works.

提交回复
热议问题