2012-07-03 43 views
0

我使用ExtJs 4.1和DeftJS。我在一个窗口中使用来自商店数据的网格。应该在打开窗口时重新加载商店中的数据,并在关闭时清除数据。浏览器刷新并重新启动后ExtJS存储仍然填满

但是,如果即使如果我刷新浏览器,并且也重新启动浏览器后,相同的旧数据仍然在网格中。这有可能吗?

如何清除店铺?

我的店看起来是这样的:

Ext.define('XXX.plugins.monitor.store.GridLogfiles', { 
    extend : 'Ext.data.Store', 
    mixins: [ 
    'Deft.mixin.Injectable' 
    ], 

    destroy: function() { 
    return this.callParent(arguments); 
    }, 

    // model: Deft.Injector.resolve('modelGridLogfiles'), 
    model: 'XXX.plugins.monitor.model.GridLogfiles', 

    proxy : { 
    type  : 'ajax', 
    url  : 'XXX:8090/devel/phi/dev/04-presentation/von_kay/http-api/HEAD/index.php', 
    extraParams: { 
     user  : 'test', 
     pass  : 'test', 
     vers  : 'extjs.json', 
     module : 'monitor', 
     func  : 'getLogfiles' 
    }, 
    reader  : { 
     type: 'json', 
      root: 'list', 
//   root: 'list.getLogFiles', 
//   root: 'getLogfiles', 
     successProperty:false 
    } 
    } 
, autoLoad: true 
}); 

我喜欢这种模式:

Ext.define('XXX.plugins.monitor.model.GridLogfiles', { 
    extend: 'Ext.data.Model', 
    mixins: [ 
    'Deft.mixin.Injectable', 
    ], 

    destroy: function() { 
    return this.callParent(arguments); 
    }, 

    fields: [ {name: 'key'}, {name: 'value'} ] 
    // fields: [ { name : 'value' } ] 
}); 

在我的窗口,我绑定存储与:

,items: [{ 
    xtype: 'grid', 
    itemId: 'gridlogfiles', 
    store: Deft.Injector.resolve('storeGridLogfiles'), 
... 

回答

0

问题修复了,在我店里发现了root