firefox:
self.Controller.userStore.on({
'load':function(){
console.log('load',arguments);
}
});
render: function(combo) {
console.log(combo.store);
window.store = combo.store;
combo.store.load({
params: {
userId: Application.Main.State.User.ID,
userLevel: Application.Main.State.User.Level,
loadOnlyMaxLevel: true,
loadNetworks: true,
lang: Application.Main.State.LanguageCode
}
});
}
javascript Exception Handler:
var ExceptionHandler = {
//
// @param exc object the exception object that was thrown
// @param context string the current context describing the method in which the error occured
// @param withPrompt boolean true to show a n alert box
// @param afterPromptCallback function function to call when the user clicked OK in the alert box if using Ext message box
report: function(exc, context, withPrompt) { //, afterPromptCallback) {
Trace.logerror(exc, context);
//// if (! isUndefinedOrNull(window.onerror))
// window.onerror(exc);
//
var msg;
if (!isEmpty(exc.message) || (typeof(exc) == 'Error')) {
// format the exception object
msg = exc.message + ';';
// if fbug installed...
if(exc.name)
msg += exc.name + ';';
if (exc.fileName)
msg += exc.fileName + ';';
if (exc.lineNumber)
msg += exc.lineNumber + ';';
if (exc.stack)
msg += exc.stack + ';';;
}
else {
msg = exc; // simple custom text message has been passed instead of exception object
}
if (withPrompt) {
try {
Ext.MessageBox.show({
title: context ? context : 'UNEXPECTED ERROR',// translate('Error'),
msg: msg,
buttons: Ext.MessageBox.OK,
minWidth: 300,
icon: Ext.MessageBox.ERROR
// multiline: true
});
} catch(exc) {
alert(msg);
}
}
if (isDefined(Ext))
Ext.fly('loading-mask').hide(); // hide global loading mask if it has been shown
}
}
浙公网安备 33010602011771号