I'm using Extjs 4.1 MVC, I have a simple store :
Ext.define('Proj.store.GraphData', {
extend: 'Ext.data.Store',
model: 'Proj.model.GraphData',
autoLoad: false,
proxy: {
type: "ajax",
reader: {
type: 'json',
root: 'data'
}
}});
I want to handle its update event from the controller, so this is the controller :
Ext.define('Proj.controller.RenderGraph', {
extend: 'Ext.app.Controller',
stores: ['GraphData'],
models : ['GraphData'],
init: function () {
var me = this;
me.getGraphDataStore().addListener('update',this.onStoreUpdate, this);
this.control({
....
})
},
onStoreUpdate : function () {
alert('OKK');
}
But when I update the store, it doesn't show anything, what am I doing wrong please?