PDA

View Full Version : Controller methods



env0ke
14 Sep 2011, 10:46 PM
Hi all

I try start example from extjs-4.0.2 docs:


Ext.define('MyApp.controller.Users',{
extend:'Ext.app.Controller',

refs:[
{
ref:'list',
selector:'grid'
}
],

init:function(){
this.control({
'button':{
click:this.refreshGrid
}
});
},

refreshGrid:function(){
this.getList().store.load();
}
});

But i see error "this.getList() is undefined" in firebug. What i can do?

env0ke
14 Sep 2011, 10:58 PM
Problem solved. I set incorrect selector for grid in my app.

mitchellsimoens
15 Sep 2011, 5:00 AM
When you post code, please wrap in the BBCode tags.