X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=roojs-ui-debug.js;h=c74dbd35a1e0682fe46baf10f53183b5918294a9;hb=f1133313680e37dbded43ca12e254e535106dde7;hp=3abb82929c7354038d76117e178f63c6109b5aba;hpb=9c7a8ec74e80c6351625f2b02b15673ef54753ae;p=roojs1 diff --git a/roojs-ui-debug.js b/roojs-ui-debug.js index 3abb82929c..c74dbd35a1 100644 --- a/roojs-ui-debug.js +++ b/roojs-ui-debug.js @@ -712,7 +712,8 @@ Roo.extend(Roo.data.Store, Roo.util.Observable, { // private // Called as a callback by the Reader during a load operation. loadRecords : function(o, options, success){ - if(!o || success === false){ + + if(!o){ if(success !== false){ this.fireEvent("load", this, [], options, o); } @@ -1563,8 +1564,10 @@ Roo.extend(Roo.data.HttpProxy, Roo.data.DataProxy, { try { result = o.reader.read(response); }catch(e){ + o.success = false; + o.raw = { errorMsg : response.responseText }; this.fireEvent("loadexception", this, o, response, e); - o.request.callback.call(o.request.scope, null, o.request.arg, false); + o.request.callback.call(o.request.scope, o, o.request.arg, false); return; } @@ -1970,19 +1973,27 @@ Roo.extend(Roo.data.JsonReader, Roo.data.DataReader, { } var records = []; for(var i = 0; i < c; i++){ - var n = root[i]; + var n = root[i]; var values = {}; var id = this.getId(n); for(var j = 0; j < fl; j++){ f = fi[j]; - var v = this.ef[j](n); - if (!f.convert) { - Roo.log('missing convert for ' + f.name); - Roo.log(f); - continue; - } - values[f.name] = f.convert((v !== undefined) ? v : f.defaultValue); - } + var v = this.ef[j](n); + if (!f.convert) { + Roo.log('missing convert for ' + f.name); + Roo.log(f); + continue; + } + values[f.name] = f.convert((v !== undefined) ? v : f.defaultValue); + } + if (!Record) { + return { + raw : { errorMsg : "JSON Reader Error: fields or metadata not available to create Record" }, + success : false, + records : [], + totalRecords : 0 + }; + } var record = new Record(values, id); record.json = n; records[i] = record; @@ -10097,7 +10108,7 @@ Roo.DialogManager = function(){ * @class Roo.LayoutDialog * @extends Roo.BasicDialog * @children Roo.ContentPanel - * @builder-top + * @parent builder none * Dialog which provides adjustments for working with a layout in a Dialog. * Add your necessary layout config options to the dialog's config.
* Example usage (including a nested layout): @@ -31271,7 +31282,7 @@ Roo.LayoutStateManager.prototype = { * @class Roo.ContentPanel * @extends Roo.util.Observable * @children Roo.form.Form Roo.JsonView Roo.View - * @builder-top + * @parent Roo.BorderLayout Roo.LayoutDialog builder-top * A basic ContentPanel element. * @cfg {Boolean} fitToFrame True for this panel to adjust its size to fit when the region resizes (defaults to false) * @cfg {Boolean} fitContainer When using {@link #fitToFrame} and {@link #resizeEl}, you can also fit the parent container (defaults to false)