X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=Roo%2Fdata%2FJsonReader.js;h=98c8ce888ca1b6d4d06d9c17cdfeee6725d153e5;hb=7b5377cebc7b19f494c0f0763fbf5644cdfb1a81;hp=568d2842f6f04a121eedf413cab31a91a6b86acf;hpb=9aa337b8a367eb1f56c281e77e068e6ee7e6724b;p=roojs1 diff --git a/Roo/data/JsonReader.js b/Roo/data/JsonReader.js index 568d2842f6..98c8ce888c 100644 --- a/Roo/data/JsonReader.js +++ b/Roo/data/JsonReader.js @@ -211,15 +211,12 @@ Roo.extend(Roo.data.JsonReader, Roo.data.DataReader, { totalRecords : totalRecords }; }, - /** - * using 'cn' the nested child reader read the child array into it's child stores. - * @param {Object} rec The record with a 'children array - */ - loadDataFromChildren: function(rec) + // used when loading children.. @see loadDataFromChildren + toLoadData: function(rec) { // expect rec just to be an array.. eg [a,b,c, [...] << cn ] var data = typeof(rec.data.cn) == 'undefined' ? [] : rec.data.cn; - return this.loadData({ data : data, total : data.length }); + return { data : data, total : data.length }; } }); \ No newline at end of file