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