I use ExtJs 4.1 and DeftJS. I use a grid with data from a store in a window. The data from the store should be reloaded when opening the window, and when closing it should be cleared.
However if even If I refresh the browser, and also after restarting the browser, the same old data is still in the grid. Hows that possible?
How to clear the store?
My store looks like this:
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
} );
My model like this:
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' } ]
} );
In my window I bind the store with:
,items: [{
xtype: 'grid',
itemId: 'gridlogfiles',
store: Deft.Injector.resolve('storeGridLogfiles'),
...