roojs-debug.js
[roojs1] / roojs-debug.js
index 5310be1..aa68db2 100644 (file)
@@ -38739,8 +38739,10 @@ Roo.extend(Roo.form.ComboBoxArray, Roo.form.TextField,
     {
          
         this.reset();
-
-        if (this.store.isLocal) {
+        
+        
+        
+        if (this.store.isLocal && (typeof(v) == 'string')) {
             // then we can use the store to find the values..
             // comma seperated at present.. this needs to allow JSON based encoding..
             this.hiddenEl.value  = v;
@@ -38761,6 +38763,13 @@ Roo.extend(Roo.form.ComboBoxArray, Roo.form.TextField,
                 
             
         }
+        if (typeof(v) == 'object') {
+            // then let's assume it's an array of objects..
+            Roo.each(v, function(l) {
+                this.addItem(l);
+            }, this);
+             
+        }
         
         
     },
@@ -38770,7 +38779,7 @@ Roo.extend(Roo.form.ComboBoxArray, Roo.form.TextField,
         this.reset();
         this.el.dom.value = v[this.displayField];
         this.hiddenEl.dom.value = v[this.valueField];
-        if (!v[this.valueField].length) {
+        if (typeof(v[this.valueField]) != 'string' || !v[this.valueField].length) {
             return;
         }
         var keys = v[this.valueField].split(',');
@@ -53291,7 +53300,11 @@ Roo.extend(Roo.XComponent, Roo.util.Observable, {
             }
         }
         
-               
+               if (!this.parent.el) {
+                       // probably an old style ctor, which has been disabled.
+                       return;
+                       
+               }
                // The 'tree' method is  '_tree now' 
             
         var tree = this._tree ? this._tree() : this.tree();
@@ -53471,7 +53484,9 @@ Roo.apply(Roo.XComponent, {
                     function(o) { return o.order + '' }
                 );
             }
-            
+            if (obj.parent.disabled) {
+                obj.disabled = true;
+            }
             obj.parent.modules.add(obj);
         }, this);
     },
@@ -53504,15 +53519,15 @@ Roo.apply(Roo.XComponent, {
         var addMod = function(m) {
            Roo.debug && Roo.log("build Order: add: " + m.name);
             
-            mods.push(m);
-            if (m.modules) {
-                Roo.debug && Roo.log("build Order: " + m.modules.length + " child modules");
-                m.modules.keySort('ASC',  cmp );
-               Roo.debug && Roo.log("build Order: " + m.modules.length + " child modules (after sort)");
+        mods.push(m);
+        if (m.modules && !m.disabled) {
+            Roo.debug && Roo.log("build Order: " + m.modules.length + " child modules");
+            m.modules.keySort('ASC',  cmp );
+            Roo.debug && Roo.log("build Order: " + m.modules.length + " child modules (after sort)");
 
-                m.modules.each(addMod);
-            } else {
-               Roo.debug && Roo.log("build Order: no child modules");
+            m.modules.each(addMod);
+        } else {
+            Roo.debug && Roo.log("build Order: no child modules");
            }
             // not sure if this is used any more..
             if (m.finalize) {