关于Ext读取DWR返回数据的疑惑

各位老大,我的问题是这样的:

1、我使用dwr返回了一个完整的json格式的数据函数,类似  myjar.myfun();
2、现在需要把它的返回数据加载到Ext的   TreeLoad中去,请教如何处理??

3、这是我的Ext部分:

Ext.BLANK_IMAGE_URL = 'js/ext/resources/images/default/s.gif';
Ext.onReady(function(){
var root = new Ext.tree.AsyncTreeNode({text:'【税务机关列表】'});
var tree = new Ext.tree.TreePanel({
                      region:'west',
                      contentEl:'west-div',
                      title:'【树列表】',
                      split:true,
                      width: 200,
                      minSize: 175,
                      maxSize: 400,
                      autoScroll :true,
                      expanded:true,
                      collapsible: true,
                      margins:'0 0 0 0',
                      animate:true,
                      waitMsg:"正在加载数据,稍等......",
                      loader: new Ext.tree.TreeLoader({dataUrl: '/NewSMS/data.htm'}),
                      loader: new Ext.tree.DWRTreeLoader({dataUrl:SwjgBus.getjsonTree}),                      
                      proxy: new Ext.data.DWRProxy(SwjgBus.getjsonTree, true),                     
//                      loader: new Ext.tree.TreeLoader({dwrCall:SwjgBus.getjsonTree}),
                      root:root
               });
    tree.on('click', function (node){ 
               if(node.isLeaf()){ 
                   if( node.attributes.hrefTarget===undefined){ 
                        node.attributes.hrefTarget='#'; 
                        return; 
                   } 
               try {Ext.get('center-iframe').dom.src = node.attributes.hrefTarget ; } catch(e){} 
               } 
            } , this, {stopEvent:true} );
            

 。。。。。。。。。。。。。。。。。。。。。。

你可能感兴趣的:(json,PHP,Ajax,DWR,ext)