Slide 19
Slide 19 text
Example - Controller
Ext.define(‘example.controller.Index’, {
extend: ‘Ext.app.Controller’,
refs: [
{
ref: ‘list’,
selector: ‘grid’
}
],
models: [
‘User’
],
stores: [
‘index.User’
],
views: [
‘Userlist’
],
init: function() {
console.log(‘Init controller!’);
this.control({
‘button’: { click: this.refreshGrid }
});
},
refreshGrid: function() {
this.getList().store.load();
}
});
Thursday, June 7, 2012