I have many instances in my application where the output is shown in tables. What I want to do is allow the user to order the table based on any of the columns. The first time they click it would sort ASC, the next time DESC, or have an Up arrow and Down arrow to sort each way. Now, I could hardcode this in, but it would be hours of retyping the same thing and if there was a bug I have to distribute to all the code blocks.
I am wanting to create one centralized solution for this that can be attached to any table output. Basically create a query then run the query thru a method, then go to the findAll. Now, what is the best way to approach this? Should I make a component? Should I make it a plugin? Also, what is the most efficient way to pass the sorting from the view back to the method? Utlimately it will be done via AJAX. Ideally it would keep the sorting you have and apply more. So, you could do a sort on last name, then sort on first name and it wouldn't just apply the next one. Thanks and I am very happy to be working in CakePHP again. Good job developers I am still here. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~----------~----~----~----~------~----~------~--~---
