2009年12月11日星期五

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

Try removing the semicolon after ->setAutoJsonSerialization(false)

--
Hector


On Fri, Dec 11, 2009 at 4:54 AM, Exception e <exceptione@hotmail.com> wrote:

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.


没有评论: