Hello,
I create a class that extends ext.data.store. I create two other classes that extend the first. Oddly the two derived classes share thesame model :
Class 1 (Mother) :
Code:
Ext.define('Appli.store.GridFilter',{
extend:'Ext.data.Store',
proxy : {
actionMethods :{
read:'post'
},
type:'rest',
reader : {
type: 'json',
root: 'rows'
}
},
constructor: function(config) {
this.callParent([config])
return this;
}
});
Class 2 :
Code:
Ext.define('Di.store.logExec.GridFilter',{
extend:'Appli.store.GridFilter',
model: 'Di.model.logExec.GridFilter',
constructor:function(config){
this.proxy.url = '/di/LogExecFindGrid/read/';
this.callParent(arguments);
return this;
}
});
Class 3 :
Code:
Ext.define('Di.store.tache.GridFilter',{
extend:'Appli.store.GridFilter',
model:'Di.model.tache.GridFilter',
constructor:function(config){
this.proxy.url ='/di/TacheFindGrid/read/';
this.callParent(arguments);
return this;
}
});
If I use the config property, then it works :
Class 1 (Mother) :
Code:
Ext.define('Appli.store.GridFilter',{
extend:'Ext.data.Store',
config:{
proxy:{
actionMethods :{
read:'post'
},
type:'rest',
reader: {
type: 'json',
root: 'rows'
}
}
},
constructor: function(config) {
this.initConfig(config);
this.callParent([config])
return this;
}
});
class 2 :
Code:
Ext.define('Di.store.logExec.GridFilter',{
extend:'Appli.store.GridFilter',
config:{
model:'Di.model.logExec.GridFilter',
proxy:{
url :'/di/LogExecFindGrid/read/'
}
}
});
Class 3 :
Code:
Ext.define('Di.store.tache.GridFilter',{
extend:'Appli.store.GridFilter',
config:{
model:'Di.model.tache.GridFilter',
proxy:{
url :'/di/TacheFindGrid/read/'
}
}
});
Can you help me?