First, if the models are associated, you can
$this->Project->Person->findAll(); (or add the model to $uses)  you
don't need to call requestAction(). I  suggest you to read:
http://cakebaker.42dh.com/2008/01/19/fat-models-and-how-they-change-how-you-use-the-model-class/

Second, searching on http://www.google.com for "cakephp pagination
associated model", I found :

http://groups.google.es/group/cake-php/browse_thread/thread/5d09c06f96e5d483

And the guy who answers sounds like if he had read the api:

http://api.cakephp.org/1.2/class_controller.html#6f79c1eed018894aede112c294087345

Hth,
- Dardo Sordi.

On Jan 19, 2008 10:21 AM, dandreta <[EMAIL PROTECTED]> wrote:
>
> Hi!
> I have 2 tables: projects and persons.
> In my ProjectsController I have a function that shows in the view a
> list of all the persons of the database. For it I have this:
> $this -> set ('persons', $this -> requestAction ('/persons/getpersons
> '));
>
> And in PersonsController:
>
> Function getpersons () {
> return $this -> Person -> findAll ();
> }
> This works well, but what I want is to paginate the list of persons
> and I dont know how can I do it.
> What have I to change or add to obtain it?
> Thanks and regards
> >
>

--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to