if(this.store){
this.store.on('beforeload', this.onBeforeLoad, this);
this.store.on('load', this.onLoad, this);
- this.store.on('loadexception', this.onLoad, this);
+ this.store.on('loadexception', this.onLoadException, this);
this.removeMask = false;
}else{
var um = this.el.getUpdateManager();
enable : function(){
this.disabled = false;
},
-
+
+ onLoadException : function()
+ {
+ if (this.store && typeof(this.store.reader.jsonData.errorMsg) != 'undefined') {
+ Roo.MessageBox.alert("Error loading",this.store.reader.jsonData.errorMsg);
+ }
+ this.el.unmask(this.removeMask);
+ },
// private
- onLoad : function(){
+ onLoad : function()
+ {
this.el.unmask(this.removeMask);
},
if(this.store){
this.store.un('beforeload', this.onBeforeLoad, this);
this.store.un('load', this.onLoad, this);
- this.store.un('loadexception', this.onLoad, this);
+ this.store.un('loadexception', this.onLoadException, this);
}else{
var um = this.el.getUpdateManager();
um.un('beforeupdate', this.onBeforeLoad, this);