hi all,

I want to pass 'vulnerabilities.xml' to list action(it means that I want to
variable that value in list action)... but I use of contextSwitching. How
can I do that? How can I pass parameters with contextSwitching to a action??

(this value come from extjs, baseParams...)


    public function init()
    {
        $this->_helper->contextSwitch()
        ->addActionContext('list', 'json')
        ->setAutoJsonSerialization(true)
        ->initContext();
    }


...

    public function listAction()
    {
        $nodes = simplexml_load_file('*vulnerabilities.xml*'); // must be
$nodes = simplexml_load_file($xml);
        $total['total'] = 5;
        if (is_object($nodes)) {
            $result = get_object_vars($nodes);
        }
        $result = array_merge((array)$total, (array)$result);
        $this->view->assign($result);
    }



Thanks,
Shahrzad

Reply via email to