roojs-ui.js
[roojs1] / roojs-ui-debug.js
index 791e2d5..eb00367 100644 (file)
@@ -1097,7 +1097,7 @@ Roo.data.SimpleStore = function(config)
 {
     Roo.data.SimpleStore.superclass.constructor.call(this, {
         isLocal : true,
-        reader: typeof(config.reader) != 'undefined' ? config.reader : new Roo.data.ArrayReader({
+        reader:  new Roo.data.ArrayReader({
                 id: config.id,
                 fields : config.fields
             },
@@ -20368,7 +20368,7 @@ Roo.extend(Roo.form.ComboNested, Roo.form.ComboBox, {
         //view.on('click', this.onViewClick, this, { list : i });
 
         store.on('beforeload', this.onBeforeLoad, this);
-        store.on('load',  this.onStoreLoad, this, { list  : i});
+        store.on('load',  this.onLoad, this, { list  : i});
         store.on('loadexception', this.onLoadException, this);
 
         // hide the other vies..
@@ -20439,10 +20439,7 @@ Roo.extend(Roo.form.ComboNested, Roo.form.ComboBox, {
     
         //this.el.focus();
     },
-    onStoreLoad : function ()
-    {
-        Roo.log(arguments);
-    },
+    
     
     // private
     onLoadException : function()
@@ -20481,12 +20478,12 @@ Roo.extend(Roo.form.ComboNested, Roo.form.ComboBox, {
         var lw = Math.floor(
                 ((this.listWidth * 3 || Math.max(this.wrap.getWidth(), this.minListWidth)) - this.list.getFrameWidth('lr')) / 3
         );
-        
-        this.stores[opts.list+1].loadData( typeof(rec.data.cn) == 'undefined' ? [] : rec.data.cn);
+        var data =  typeof(rec.data.cn) == 'undefined' ? [] : rec.data.cn;
+        this.stores[opts.list+1].loadData( data );
         this.views[opts.list+1].getEl().setHeight( this.innerLists[0].getHeight());
-        this.views[opts.list+1].getEl().setStyle({ display : rec.data.cn.length ? 'block' : 'none' });
+        this.views[opts.list+1].getEl().setStyle({ display : data .length ? 'block' : 'none' });
         this.innerLists[opts.list+1].setHeight( this.innerLists[0].getHeight());
-        this.list.setWidth(lw * (opts.list + (rec.data.cn.length ? 2 : 1))); 
+        this.list.setWidth(lw * (opts.list + (data.length ? 2 : 1))); 
     },
     onDoubleClick : function()
     {
@@ -20504,7 +20501,7 @@ Roo.extend(Roo.form.ComboNested, Roo.form.ComboBox, {
     findRecordInStore : function(store, prop, value)
     {
         var cstore = new Roo.data.SimpleStore({
-            reader : this.store.reader,  // we need array reader.. for 
+            fields : this.store.reader.meta.fields, // we need array reader.. for 
             data : [ ]
         });
         var _this = this;