I have done something similar using a sortable grid via AJAX calls.
Mine is implemented using the Yahoo! User Interface libraries instead
of the built-in ones.  I was having trouble using the
Prototype/Scriptaculous helpers and getting stuff to work properly in
IE.  I have plans to do up a tutorial on what I did, but time is
always short that kind of thing. ;)

I don't know if you could do up a generic plugin or something, as most
AJAX stuff is custom work anyway.

On 8/31/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> 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.
>
>
> >
>


-- 
Chris Hartjes

"The greatest inefficiencies come from solving problems you will never have."
-- Rasmus Lerdorf

@TheBallpark - http://www.littlehart.net/attheballpark
@TheKeyboard - http://www.littlehart.net/atthekeyboard

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---

Reply via email to