LOL, school-boy error, that seems to be working (or at least I haven't
received an error). 

thanks :)

-----Original Message-----
From: symfony-users@googlegroups.com [mailto:[EMAIL PROTECTED]
On Behalf Of Claas Diederichs
Sent: 10 January 2008 14:49
To: symfony-users@googlegroups.com
Subject: [symfony-users] Re: any way to access getisXmlHttpRequest
preExecute?


Hi,

you have to use
$this->getRequest()->isXmlHttpRequest()
there is no get Prefix for this function.

Greetings
Claas

Lee Bolding schrieb:
> Hey people,
> 
> Anybody know a way I can access sfWebRequest's getisXmlHttpRequest from a
> class that extends sfActions?
> 
> I've got a custom class that extends sfActions, and in it's preExecute
> method I want to disable layout for any AJAX requests.
> 
> I'm trying to execute the following :
> 
>                 $this->setLayout($this->user->getUserGroup());
> 
>                 // if this is an AJAX request, we have no layout
>                 if ($this->getIsXmlHttpRequest()) $this->setLayout(FALSE);
> 
> This code fails because $this is an sfComponent, I can't use
> $this->getRequest()->getIsXmlHttpRequest() either, because
> getIsXmlHttpRequest is available only from sfWebRequest :-/
> 
> Thanks in advance...




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to