2009年5月13日星期三

Re: [fw-mvc] ZEND MVC and AJAX

Hector Virgen wrote:
>
> Are you using a layout? If so, you'll need to exit at the end of your
> action
> (to prevent the layout from being rendered). That's because
> $this->_helper->viewRenderer->setNoRender() only disables rendering of the
> action, not the layout.
> Or, better yet, use the ajaxContext action helper. It will automatically
> render the correct view script and disable the layout.
> http://framework.zend.com/manual/en/zend.controller.actionhelpers.html#zend.controller.actionhelpers.contextswitch.ajaxcontext
>

Action handler is the way to go. But, JFTR if you need to disable the layout
for some other reason you can call:

$this->_helper->layout->disableLayout();

from within your action controller.

Regards,

Goran Juric
http://gogs.info/

--
View this message in context: http://www.nabble.com/Re%3A-ZEND-MVC-and-AJAX-tp23525679p23528767.html
Sent from the Zend MVC mailing list archive at Nabble.com.

没有评论: