Re: Difficulty understanding requestAction

2006-10-12 Thread Drex

Hi,

I remember having the same problem when playing with cake. If I am not
wrong you have to return the value explicitly in the requested action.

regards, dp


--~--~-~--~~~---~--~~
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: Re: Difficulty understanding requestAction

2006-10-12 Thread Samuel DeVore

try adding array('return') to the call
$this->set('cities', $this->requestAction('Cities/getCities', array('return'));


On 10/12/06, BlenderStyle <[EMAIL PROTECTED]> wrote:
>
> Everything looks good here. However, I think the problem may be with
> the fact that you're using the PagesController. I tried using
> PagesController and it was strange because it's a part of the core of
> CakePHP. Try doing the same thing in a different controller and see
> what happens.
>
> Also, try this variation on the action name in your contact() method:
> $this->set('cities', $this->requestAction('Cities/getCities'));
>
>
> >
>


-- 
==
S. DeVore
(the old fart) the advice is free, the lack of crankiness will cost you

--~--~-~--~~~---~--~~
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: Difficulty understanding requestAction

2006-10-12 Thread BlenderStyle

Everything looks good here. However, I think the problem may be with
the fact that you're using the PagesController. I tried using
PagesController and it was strange because it's a part of the core of
CakePHP. Try doing the same thing in a different controller and see
what happens.

Also, try this variation on the action name in your contact() method:
$this->set('cities', $this->requestAction('Cities/getCities'));


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



Difficulty understanding requestAction

2006-10-12 Thread joel

Can somebody help me with requestAction()?  I'm trying to use it
exactly like it's used in the manual, but it's not working for me.  In
my PagesController, I want to generate a list of cities from my
CityController.  Here's what I'm doing:

// in PagesController
function contact() {
  $this->set('cities', $this->requestAction('/cities/getCities'));
}

// in CitiesController
function getCities() {
  return $this->City->generateList();
}

When I do this, nothing is returned.  The $cities variable is empty in
the /pages/contact.thtml view.  Got any ideas?


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