as 100rk pointed out $this->params['bare'] == 1 when coming through
requestAction.
--~--~-~--~~~---~--~~
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
T
On Fri, 30 Jun 2006 10:19:42 -0700
gwoo <[EMAIL PROTECTED]> wrote:
> Yes if you put $this->render() in the method. As was discussed the
> really should not be needed and a simple return is preferred.
>
> function foo(){
> return $this->Example->findAll();
> }
OK, but doesn't work for me
Yes if you put $this->render() in the method. As was discussed the
really should not be needed and a simple return is preferred.
function foo(){
return $this->Example->findAll();
}
--~--~-~--~~~---~--~~
You received this message because you are subscribe
I would really like to see my original question answered. Doesn't the
view get rendered with requestAction(), even if the 'return' parameter
isn't passed? Master bakers, can you enlighten us?
Thanks in advance.
--~--~-~--~~~---~--~~
You received this message beca
I'm also dreaming of a
$this->isCalledByRequestAction
I made a ticket for this https://trac.cakephp.org/ticket/1013
olivvv
Gonçalo Marrafa wrote:
> Hi.
>
> This thread is being very enlightening. I have a question though: doesn't
> an action always render a view (unless $autoRender is set to
> if ($this->isCalledByRequestAction) {
if (!empty($this->params['bare']))
But be careful, 'bare' parameter is 1 in case of ajax call also
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To
Hi.
This thread is being very enlightening. I have a question though: doesn't
an action always render a view (unless $autoRender is set to false)? Here's
an example:
in one_controller.php:
function foo()
{
$this->set('foo', $this->Foo->findAll());
$this->render('foo_view');
}
*NOT
unless you want the Menu model available in all of your controllers,
I would not put it in the uses array. Both the uses array and the
method I described use references, so they are pretty much the same
in that respect.
As far as MVC, requestAction in a view should be avoided. Elements
br
One thing about your change to my code example gwoo:
Maybe I'm missing something, but here is what I think.
-> Your solution does better for the requestAction without view
scenario
However, what I was talking about, was to *remove* a requestAction call
for the menu and move it to the AppContr
very useful explanations felix and gwoo. Thanks a lot, I'll sleep less
stupid tonight.
gwoo wrote:
> There are a couple of things to keep in mind in this discussion.
> First, if you use full page caching putting a requestAction in and
> element that called a menu controller would be better.
There are a couple of things to keep in mind in this discussion.
First, if you use full page caching putting a requestAction in and
element that called a menu controller would be better. You can always
use dont cache this Also, as of version
1.2 you will be able to specifically cache cert
Hi olivvv:
I just modified the AppController from a project I work on right now to
only show the process of setting $menu in every view (unless you set
your controllers var $useMenu to false), so you can use it in your
layout without having to do requestActions:
class AppController extends C
Hi felix
"
My advice to people who are concerned about performance, is to think
about what they are using requestAction for right now, and to try to
figure out if some of it should be moved to the AppController. This
will always be the better and faster solution if you have something
like a me
Ok, between this, the wiki and manual things are getting tasty and I
think I'm understanding how to bake better cake... thanks all for the
discussion and feedback.
Previously I was using requestAction to return rendered views from
foreign controllers, by using it in my elements or directly in th
Hi johnwik,
I think the problem with requestAction is not the dispatching alone.
There is a good bit of things happening, just to name a view:
Dispatcher
Dispatcher does routing
Dispatcher figures out what (Plugin)/Controller/Action is request
Dispatcher loops through all $paths->con
It depends on way how You're using requestAction().
If You're using it like:
$this->requestAction('/some/url');
or
$somedata = $this->requestAction('/some/url');
then it is supposed to be quite fast, as target controller's action is
not rendered. Off course there is new dispatch process for every
Hi!
I am also using actionRequest to render several different controllers
from within a main controller and I have noticed that the dispatcher is
called for each call to a controller. I haven't done any real testing
yet so I'm not sure about the performance.
Is there a way to reuse the Dispatcher
Thanks Felix,
That's great info - I actually had bookmarked your blog post in my
feeds to read later - wasn't sinking in when I tried reading it before
- so I'll take a closer look now.
all the best,
-ad
--~--~-~--~~~---~--~~
You received this message becau
Hey admataz,
from my experience the performance overhead from requestAction can be
significant when you have more then 5-7 of such calls for each action
you execute.
However, this definitely depends on the work-load that is caused by the
actions/views themselfs, so I would need to do a serie
19 matches
Mail list logo