Comments: requestAction
2 - How does this work?
How do you access the data when you use the requestAction inside the renderElement:
<?php
echo $this->renderElement(
'users',
$this->requestAction('/users/getUserList') // <--- How do you use this!!
);
?>
3 - This documentation appears incorrect.
In the example of calling an element it should define the variable name.
echo $this->element('users',array('users'=>$this->requestAction('/users/getUserList')));
or, the getUserList method should return an array
return array('users'=>$this->User->findAll('User.active = 1'));
You can now use the data in the variable $user within your element.
4 - A note on requestAction
In 1.2 it is better practice to call requestAction() with array style parameters. I ran in to an issue with a trailing backslash that can be avoided by using the array style of passing. This method is also better for performance.
Here is an example.
$this->requestAction( array( 'controller' => 'controllerName', 'action' => 'requestedAction' ), array( 'pass' => array( 5, 'Test' ) ) );
Note: 'pass' is the arguments to the action being called. They show up in the order listed in the array.
5 - When used in conjunction with ACL/Auth
Be aware that if a controller action has certain restrictions on it within Auth and/or ACL that when calling it via requestAction will maintain those restrictions. Although common sense would deem this easy to diagnose, one can easily forget about restrictions when simply trying to get something to work.

By poppitypop on 24/6/08
1 - Well written article
One question though: Will requestAction work if the action is prefixed with an underscore (eg _getUserList)? Because one would usually want to do this often me thinks!
(for those that don't remember actions prefixed with an underscore are not accessible to the public directly. Eg. /controller/_action would not work)