2012-07-03 44 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