mardi 20 janvier 2015

I mooving method to Controller from View this not working/

Hello.

Code:



'toolbar button[action=remove]': {
click: this.remove
},


remove: function (sm, selection) {
var selection = this.getView().getSelectionModel().getSelection()[0]; // here i get exeption
if (selection.length > 1) {
store.remove(selection);
store.sync();
}
else {
store.remove(selection);
store.sync();
}
}

This exeption i get: 0x800a138f - JavaScript runtime error: Unable to get property 'indexOf' of undefined or null reference.

this.getView() - I think i need chenge view to another this.view but how i do this?

Thanks.






I mooving method to Controller from View this not working/

Aucun commentaire:

Enregistrer un commentaire