allow string based values for comboboxarray
[roojs1] / Roo / tree / TreeNode.js
index cc84671..e797d60 100644 (file)
@@ -18,7 +18,7 @@
  * @cfg {Boolean} allowDrop false if this node cannot be drop on
  * @cfg {Boolean} disabled true to start the node disabled
  * @cfg {String} icon The path to an icon for the node. The preferred way to do this
- * is to use the cls or iconCls attributes and add the icon via a CSS background image.
+ *    is to use the cls or iconCls attributes and add the icon via a CSS background image.
  * @cfg {String} cls A css class to be added to the node
  * @cfg {String} iconCls A css class to be added to the nodes icon element for applying css background images
  * @cfg {String} href URL of the link used for the node (defaults to #)
@@ -155,12 +155,12 @@ Roo.tree.TreeNode = function(attributes){
     if (typeof(this.attributes.items) == 'undefined' || !this.attributes.items) {
         return;
     }
-    return;
+    
     
     Roo.each(this.attributes.items, function(c) {
         this.appendChild(Roo.factory(c,Roo.Tree));
     }, this);
-    delete this.attribute.items;
+    delete this.attributes.items;
     
     
     
@@ -301,7 +301,8 @@ Roo.extend(Roo.tree.TreeNode, Roo.data.Node, {
                 this.renderChildren();
             }
             this.expanded = true;
-            if(!this.isHiddenRoot() && (this.getOwnerTree().animate && anim !== false) || anim){
+            
+            if(!this.isHiddenRoot() && (this.getOwnerTree() && this.getOwnerTree().animate && anim !== false) || anim){
                 this.ui.animExpand(function(){
                     this.fireEvent("expand", this);
                     if(typeof callback == "function"){