PDA

View Full Version : Hide loading mask from Model



johija
29 Jul 2013, 12:23 PM
Hi guys,


I am using Ext.Error.raise and Ext.Error.Handle to handle my JavaScript errors like below.


// Sample Model class

getName : function() {
try {
// error due to undefined or null references
} catch (err) {
Error.raise('Some exception occurred');
}
}


The Ext.Error.handle is overridden in the Ext.application() class like below.

Ext.Error.handle = function(err) {
Ext.create('MyErrorWindow', {
title: 'Server Error',
text: "Error caught successfully!!!"
}).show();

return true;
};


Now if an error occurs, the error is routed to the handle and I am able to see the error message. But the particular view is still showing "Loading.." even after the error is handled.

tobiu
30 Jul 2013, 8:17 AM
try:


myView.loadMask.hide();