2012-05-08 31 views
-1

只是试图让一个面板充满了从商店中填充自己的列表。我得到的只是一个空白窗口。它甚至不会在Chrome的网络窗口中发送HTTP请求。存储未从远程URL加载?

列表:

myapp.companies_list = { 
     fullscreen: true, 
     title: 'Companies', 
     iconCls: 'info', 
     xtype: 'list', 
     itemTpl: '{name}', 
     store: { 
      fields: ['name'], 
      autoload: true, 
      proxy: { 
       type: 'jsonp', 
       url: base_url+'/index.php/mobile/companies', 
       reader: { 
        type: 'json', 
        rootProperty: 'companies' 
       } 
      } 
     }, 
     listeners:{ 
      initialize: function(){ 
       this.getStore().load(); 
      } 
     } 
    } 

这将没有监听工作。为什么?

回答

1

这是autoLoad而不是自动加载。注意首都L

0

我有同样的问题,我把代理设置到模型,而不是存储和自动加载作品。

你可以改变jsonp成ajax或休息,如果不工作。