Re: Table Output Ordering

2006-09-01 Thread [EMAIL PROTECTED]

Thanks Eightyseven.  That seems to be exactly what I was looking for.
Nice to see the wiki updated.  The last time I grabbed the pagination
helper was back in November.  Looks like it has been updated QUITE a
bit since then.  Trying to get back to see the new stuff.  Like the
event selectors I found to consolidate your AJAX calling and make the
code more clean and much more degradable.

Thanks!


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Table Output Ordering

2006-09-01 Thread AD7six

Hi Troy,

Try this> http://wiki.cakephp.org/tutorials:pagination It seems to me
it does exactly what you are asking ;) (My site is currently offline,
so no live examples at the time of posting).

Cheers,

AD7six


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Table Output Ordering

2006-08-31 Thread [EMAIL PROTECTED]

Don't get hung up on it being AJAX.  It will eventually be AJAX.  But I
want it to work straight up without AJAX as well.  I want it to
function without being a sortable AJAX grid.  I was thinking what if I
used one of the before calls to manipulate the query.  Then to also use
a helper for the views to call them to put in the sorting links
automatically as well.

Looking at the API I am thinking this should work in app_model.php as a
beforeFind().  Now, the question that comes from that is if I set a
variable in the $this->data array in each method would that be
accesible in the beforeFind to check if set and append to the ORDER in
the queryData??

So maybe I can't make a plugin out of it, but I can achieve my goal of
having one set of coding instructions to use over and over and simplify
debugging.


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Table Output Ordering

2006-08-31 Thread Chris Hartjes

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
-~--~~~~--~~--~--~---



Table Output Ordering

2006-08-31 Thread [EMAIL PROTECTED]

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 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
-~--~~~~--~~--~--~---