j4meson
30 Jul 2012, 10:54 AM
Hi all,
I can't catch the good 'this', under my talk you can see a sample from my code in sencha mvc controller,
the function ' this.getExpression' catch the good 'this' corresponding the controller it's good so i can use the functions declared in it.
but 'this.emailRequest' catch 'form' for 'this'
Thanks a lot for your help =)
'#sendEmail': {
click: function (button) {
var contact = Ext.ComponentQuery.query('contact')[0];
var form = button.up('window').down('form').getForm();
var mask = new Ext.LoadMask(button.up('window'), { msg: this.getExpression('Sending the email...') });
mask.show();
form.submit({
success: function (form, action) {
this.emailRequest(mask, contact, 'Information', action.result.message);
},
failure: function (form, action) {
this.emailRequest(mask, contact, 'Information', action.result.message);
}
});
}
}
I can't catch the good 'this', under my talk you can see a sample from my code in sencha mvc controller,
the function ' this.getExpression' catch the good 'this' corresponding the controller it's good so i can use the functions declared in it.
but 'this.emailRequest' catch 'form' for 'this'
Thanks a lot for your help =)
'#sendEmail': {
click: function (button) {
var contact = Ext.ComponentQuery.query('contact')[0];
var form = button.up('window').down('form').getForm();
var mask = new Ext.LoadMask(button.up('window'), { msg: this.getExpression('Sending the email...') });
mask.show();
form.submit({
success: function (form, action) {
this.emailRequest(mask, contact, 'Information', action.result.message);
},
failure: function (form, action) {
this.emailRequest(mask, contact, 'Information', action.result.message);
}
});
}
}