Wednesday, February 26, 2014

Pagination Sort, Resetting Data

Hello,

I just starting baking with CakePHP and I'm slowly grasping the basics.

So far I've created a view to display all the data in table format from a table in the database with pagination.
There is a column in the table that contains browser information (Firefox, Chrome, Safari...etc).
So on the view I made some checkboxes using Form->checkbox, with each check box representing a browser. 
When the the submit button is pressed, the POST request is sent to the searchByBrowser function in the controller and 
the view is updated with the appropiate data.

Now I am adding sort() functionality using Paginator->sort() and it sorts by the specified column just fine.  

However, when I use the searchByBrower function to get the appropiate view and then try and sort the displayed data, it resets everything
to showing all the full dataset and the checkbox is no longer checked.

Is there a way to get everything to work the way it should with just CakePHP?

Thanks.


1 - Full data set view


2 - Just Firefox data

3 - Sorted on http_method, full dataset again (instead of just firefox data)






--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.

No comments: