jeudi 3 juillet 2014

Missing Ref Accessor methods.

I am trying to port my ExtJS 4.2 based app to 5.0. My Controller code is as below.

Code:



Ext.define('MyCompany.controller.CustomerAccountController', {
extend: 'Ext.app.Controller',
views: ['CustomersView'],
stores: ['CustomerAccounts'],
models : ['AppState', 'CustomerAccount'],
config: {
selectedCustomer: ''
},
refs: [{
ref: 'customersView',
selector: 'customersview'
}, {
ref: 'customersFilter',
selector: 'customersview textfield[name=filter]'
}, {
ref: 'customersList',
selector: 'customersview grid[name=customerslist]'
}


....
....

setSelectedCustomer: function() {
var customerList = this.getCustomersList(); //Throws undefined function exception
......
},

ExtJS 4.2 exposed accessor methods for all the refs declared. Looks like that feature has been removed in ExtJs 5. I read through the migration guide and did not find any guidelines on this. Is there a recommended way on how to migrate the refs accessors to 5.0?

Thanks in advance,

Kishore





Aucun commentaire:

Enregistrer un commentaire