X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/7a654f8d43fdb43d78b63d90528bed6e86b608cc..3789b528d8dd8aad4558e38e22d775bcab1cbd36:/docs/source/TreeStore.html?ds=sidebyside diff --git a/docs/source/TreeStore.html b/docs/source/TreeStore.html index 40f360f4..8e1f3150 100644 --- a/docs/source/TreeStore.html +++ b/docs/source/TreeStore.html @@ -1,4 +1,21 @@ -Sencha Documentation Project
/**
+
+
+
+  
+  The source code
+  
+  
+  
+  
+
+
+  
/**
  * @class Ext.data.TreeStore
  * @extends Ext.data.AbstractStore
  * 
@@ -22,31 +39,31 @@ Ext.define('Ext.data.TreeStore', {
     alias: 'store.tree',
     requires: ['Ext.data.Tree', 'Ext.data.NodeInterface', 'Ext.data.NodeStore'],
 
-    /**
+    /**
      * @cfg {Boolean} clearOnLoad (optional) Default to true. Remove previously existing
      * child nodes before loading.
      */
     clearOnLoad : true,
 
-    /**
+    /**
      * @cfg {String} nodeParam The name of the parameter sent to the server which contains
      * the identifier of the node. Defaults to <tt>'node'</tt>.
      */
     nodeParam: 'node',
 
-    /**
+    /**
      * @cfg {String} defaultRootId
      * The default root id. Defaults to 'root'
      */
     defaultRootId: 'root',
     
-    /**
+    /**
      * @cfg {String} defaultRootProperty
      * The root property to specify on the reader if one is not explicitly defined.
      */
     defaultRootProperty: 'children',
 
-    /**
+    /**
      * @cfg {Boolean} folderSort Set to true to automatically prepend a leaf sorter (defaults to <tt>undefined</tt>)
      */
     folderSort: false,
@@ -59,7 +76,7 @@ Ext.define('Ext.data.TreeStore', {
         
         config = Ext.apply({}, config);
         
-        /**
+        /**
          * If we have no fields declare for the store, add some defaults.
          * These will be ignored if a model is explicitly specified.
          */
@@ -91,7 +108,7 @@ Ext.define('Ext.data.TreeStore', {
         }
 
         me.relayEvents(me.tree, [
-            /**
+            /**
              * @event append
              * Fires when a new child node is appended to a node in this store's tree.
              * @param {Tree} tree The owner tree
@@ -101,7 +118,7 @@ Ext.define('Ext.data.TreeStore', {
              */
             "append",
             
-            /**
+            /**
              * @event remove
              * Fires when a child node is removed from a node in this store's tree.
              * @param {Tree} tree The owner tree
@@ -110,7 +127,7 @@ Ext.define('Ext.data.TreeStore', {
              */
             "remove",
             
-            /**
+            /**
              * @event move
              * Fires when a node is moved to a new location in the store's tree
              * @param {Tree} tree The owner tree
@@ -121,7 +138,7 @@ Ext.define('Ext.data.TreeStore', {
              */
             "move",
             
-            /**
+            /**
              * @event insert
              * Fires when a new child node is inserted in a node in this store's tree.
              * @param {Tree} tree The owner tree
@@ -131,7 +148,7 @@ Ext.define('Ext.data.TreeStore', {
              */
             "insert",
             
-            /**
+            /**
              * @event beforeappend
              * Fires before a new child is appended to a node in this store's tree, return false to cancel the append.
              * @param {Tree} tree The owner tree
@@ -140,7 +157,7 @@ Ext.define('Ext.data.TreeStore', {
              */
             "beforeappend",
             
-            /**
+            /**
              * @event beforeremove
              * Fires before a child is removed from a node in this store's tree, return false to cancel the remove.
              * @param {Tree} tree The owner tree
@@ -149,7 +166,7 @@ Ext.define('Ext.data.TreeStore', {
              */
             "beforeremove",
             
-            /**
+            /**
              * @event beforemove
              * Fires before a node is moved to a new location in the store's tree. Return false to cancel the move.
              * @param {Tree} tree The owner tree
@@ -160,7 +177,7 @@ Ext.define('Ext.data.TreeStore', {
              */
             "beforemove",
             
-            /**
+            /**
              * @event beforeinsert
              * Fires before a new child is inserted in a node in this store's tree, return false to cancel the insert.
              * @param {Tree} tree The owner tree
@@ -170,42 +187,42 @@ Ext.define('Ext.data.TreeStore', {
              */
             "beforeinsert",
              
-             /**
+             /**
               * @event expand
               * Fires when this node is expanded.
               * @param {Node} this The expanding node
               */
              "expand",
              
-             /**
+             /**
               * @event collapse
               * Fires when this node is collapsed.
               * @param {Node} this The collapsing node
               */
              "collapse",
              
-             /**
+             /**
               * @event beforeexpand
               * Fires before this node is expanded.
               * @param {Node} this The expanding node
               */
              "beforeexpand",
              
-             /**
+             /**
               * @event beforecollapse
               * Fires before this node is collapsed.
               * @param {Node} this The collapsing node
               */
              "beforecollapse",
 
-             /**
+             /**
               * @event sort
               * Fires when this TreeStore is sorted.
               * @param {Node} node The node that is sorted.
               */             
              "sort",
              
-             /**
+             /**
               * @event rootchange
               * Fires whenever the root node is changed in the tree.
               * @param {Ext.data.Model} root The new root
@@ -214,7 +231,7 @@ Ext.define('Ext.data.TreeStore', {
         ]);
         
         me.addEvents(
-            /**
+            /**
              * @event rootchange
              * Fires when the root node on this TreeStore is changed.
              * @param {Ext.data.TreeStore} store This TreeStore
@@ -269,7 +286,7 @@ Ext.define('Ext.data.TreeStore', {
         }
     },
     
-    /**
+    /**
      * Called before a node is expanded.
      * @private
      * @param {Ext.data.NodeInterface} node The node being expanded.
@@ -305,7 +322,7 @@ Ext.define('Ext.data.TreeStore', {
         return Ext.Array.filter(this.tree.flatten(), this.filterUpdated);
     },
     
-    /**
+    /**
      * Called before a node is collapsed.
      * @private
      * @param {Ext.data.NodeInterface} node The node being collapsed.
@@ -341,7 +358,7 @@ Ext.define('Ext.data.TreeStore', {
         }
     },
         
-    /**
+    /**
      * Sets the root node for this store
      * @param {Ext.data.Model/Ext.data.NodeInterface} root
      * @return {Ext.data.NodeInterface} The new root
@@ -378,7 +395,7 @@ Ext.define('Ext.data.TreeStore', {
         return root;
     },
         
-    /**
+    /**
      * Returns the root node for this tree.
      * @return {Ext.data.NodeInterface}
      */
@@ -386,7 +403,7 @@ Ext.define('Ext.data.TreeStore', {
         return this.tree.getRootNode();
     },
 
-    /**
+    /**
      * Returns the record node by id
      * @return {Ext.data.NodeInterface}
      */
@@ -394,7 +411,7 @@ Ext.define('Ext.data.TreeStore', {
         return this.tree.getNodeById(id);
     },
 
-    /**
+    /**
      * Loads the Store using its configured {@link #proxy}.
      * @param {Object} options Optional config object. This is passed into the {@link Ext.data.Operation Operation}
      * object that is created and then sent to the proxy's {@link Ext.data.proxy.Proxy#read} function.
@@ -434,7 +451,7 @@ Ext.define('Ext.data.TreeStore', {
     },
         
 
-    /**
+    /**
      * Fills a node with a series of child records.
      * @private
      * @param {Ext.data.NodeInterface} node The node to fill
@@ -478,7 +495,7 @@ Ext.define('Ext.data.TreeStore', {
         Ext.callback(operation.callback, operation.scope || me, [records, operation, successful]);
     },
     
-    /**
+    /**
      * Create any new records when a write is returned from the server.
      * @private
      * @param {Array} records The array of new records
@@ -495,8 +512,8 @@ Ext.define('Ext.data.TreeStore', {
                 original,
                 index;
 
-            /**
-             * Loop over each record returned from the server. Assume they are
+            /*
+             * Loop over each record returned from the server. Assume they are
              * returned in order of how they were sent. If we find a matching
              * record, replace it with the newly created one.
              */
@@ -517,7 +534,7 @@ Ext.define('Ext.data.TreeStore', {
         }
     },
 
-    /**
+    /**
      * Update any records when a write is returned from the server.
      * @private
      * @param {Array} records The array of updated records
@@ -548,7 +565,7 @@ Ext.define('Ext.data.TreeStore', {
         }
     },
 
-    /**
+    /**
      * Remove any records when a write is returned from the server.
      * @private
      * @param {Array} records The array of removed records
@@ -563,7 +580,7 @@ Ext.define('Ext.data.TreeStore', {
 
     // inherit docs
     removeAll: function() {
-        this.getRootNode().destroy();
+        this.getRootNode().destroy(true);
         this.fireEvent('clear', this);
     },
 
@@ -579,4 +596,6 @@ Ext.define('Ext.data.TreeStore', {
         }   
         me.fireEvent('sort', me);
     }
-});
\ No newline at end of file +});
+ +