I want to create a tree from the json of action "ordininav" of controller
"menu".
this is the action:
public function ordininavAction(){
$items = array(
array('id'=>'a', 'label'=>'a ord'),
array('id'=>'b', 'label'=>'b ord'),
array('id'=>'c', 'label'=>'c ord'),
);
$data = new Zend_Dojo_Data('id', $items);
// Encode and send response;
$this->_helper->autoCompleteDojo($data);
}
and this is my view script:
<div dojoType="dojo.data.ItemFileReadStore" jsId="menuOrdini"
url="</menu/ordininav/"></div>
<div dojoType="dijit.Tree" store="menuOrdini"
labelAttr="name" label="Menu ORD"
></div>
I have added in the dojo()-enable() ->
->requireModule('dijit.Tree')
->requireModule('dojo.data.ItemFileReadStore').
After these, i can see only the tree without children.
thanks
--
View this message in context: http://www.nabble.com/dojo.data-and-controller-action-tp20106622p20106622.html
Sent from the Zend MVC mailing list archive at Nabble.com.
没有评论:
发表评论