The ContextSwitch helper requires the "format" parameter to be set (see
Zend_Controller_Action_Helper_ContextSwitch#initContext()).

However, you could cheat and add the format parameter to the request at the
top of your init() hook:

public function init()
{
    $this->getRequest()->setParam('format', 'json');
    /* ... the rest of your code ... */
}

--
*Hector Virgen*
Sr. Web Developer
http://www.virgentech.com

Reply via email to