Saturday, July 3, 2010

Pagination and Sort not working in an ajax search result

Hello,

I don't know how to make the pagination work in an ajax search result.

I've implemented a initial view, showing the search form and all the
items in an html table. The pagination works fine as does the table
sorting.

This its index in the controller.

function index() {
$this->Piso->recursive = 1;
$this->paginate = array(
'limit' => 10
);
$this->set('pisos', $this->paginate());
}

But once I submit the search, I show the results rendering it using
ajax.

In the search funcion at the controller, I define the pagination using
the filter:

function search() {
...
$this->set('pisos', $this->paginate('Piso', $filters));
}

But the pagination is not applying the search filter, neither its
working the table sort,

Any clue on how can it be?

Thank you!
Hector

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

No comments: