2013-02-21 78 views
0

我已经定义了一个TreeStore实现,但在FireBug中,我没有看到对我的服务器的请求,也没有看到数据。如果我取消注释根属性并注释掉代理属性,我的数据不会显示。可能是什么原因?AjaxProxy不会向ExtJS TreeStore中的服务器发送请求

谢谢!

Ext.define('PM.store.Projects', { 
    extend: 'Ext.data.TreeStore', 
    model: 'PM.model.Project', 

    proxy: { 
     type: 'ajax', 
     url: 'data/projectTree.json', 
    } 

    /*root: { 
     name: 'Demo', 
     children: [ 
      { 
       name: 'Test', 
       leaf: true, 
      }, 
     ], 
    },*/ 
}); 

回答

0

您必须明确加载商店。尝试autoLoad:true,看看它是否会提出请求。