extjs 4 cannot trigger store events load and beforeload
I have an issue triggering ‘load’ and ‘beforeload’ events on stores in ext4 :
Ext.define('Emvr.store.saveFormData', {
extend: 'Ext.data.Store',
model: 'Emvr.model.saveFormData',
constructor: function(config) {
config = config || {};
this.callParent([config]);
}
})开发者_C百科;
var store_myVisitsGrid_instance = new Emvr.store.saveFormData();
store_myVisitsGrid_instance.on(load, function() {
alert('ok load');
})
It won’t get into the function when I load the data using
store_myVisitsGrid_instance.loadData(responseFromServer)
I was able to use datachanged event for that purpose.
I digged in into the sources and found that the loadData method would eventually fire datachanged event. This was not happening on the old ext 3.x.
loadData
DOESN'T trigger load
event. The load
method does.
精彩评论