2009年12月11日星期五

[fw-mvc] Contextswitch->setAutoJsonSerialization(false) - still requires view script

In my controller I have the following

function init() {
$switch = $this->_helper->getHelper('ContextSwitch');
$switch->addActionContext('my', 'json')
->setAutoJsonSerialization(false);
->initContext();
}

function myAction() {

$this->_helper->contextSwitch->setAutoJsonSerialization(true);
$this->view->thing = ...

// Hey, it still asks for a my.json.phtml file???!!!
}


Why does myAction still ask for a my.json.phtml view script?
--
View this message in context: http://n4.nabble.com/Contextswitch-setAutoJsonSerialization-false-still-requires-view-script-tp961030p961030.html
Sent from the Zend MVC mailing list archive at Nabble.com.

没有评论: