X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/7a654f8d43fdb43d78b63d90528bed6e86b608cc..6746dc89c47ed01b165cc1152533605f97eb8e8d:/docs/source/WebStorage.html diff --git a/docs/source/WebStorage.html b/docs/source/WebStorage.html index 31b72314..2cea1990 100644 --- a/docs/source/WebStorage.html +++ b/docs/source/WebStorage.html @@ -1,32 +1,46 @@ -Sencha Documentation Project
/**
- * @author Ed Spencer
+
+
+
+  
+  The source code
+  
+  
+  
+  
+
+
+  
/**
+ * @author Ed Spencer
  * @class Ext.data.proxy.WebStorage
  * @extends Ext.data.proxy.Client
  * 
  * <p>WebStorageProxy is simply a superclass for the {@link Ext.data.proxy.LocalStorage localStorage} and 
  * {@link Ext.data.proxy.SessionStorage sessionStorage} proxies. It uses the new HTML5 key/value client-side storage 
  * objects to save {@link Ext.data.Model model instances} for offline use.</p>
- * 
- * @constructor
- * Creates the proxy, throws an error if local storage is not supported in the current browser
- * @param {Object} config Optional config object
  */
 Ext.define('Ext.data.proxy.WebStorage', {
     extend: 'Ext.data.proxy.Client',
     alternateClassName: 'Ext.data.WebStorageProxy',
     
-    /**
+    /**
      * @cfg {String} id The unique ID used as the key in which all record data are stored in the local storage object
      */
     id: undefined,
 
-    /**
-     * @ignore
+    /**
+     * Creates the proxy, throws an error if local storage is not supported in the current browser
+     * @param {Object} config (optional) Config object.
      */
     constructor: function(config) {
         this.callParent(arguments);
         
-        /**
+        /**
          * Cached map of records already retrieved by this Proxy - ensures that the same instance is always retrieved
          * @property cache
          * @type Object
@@ -176,7 +190,7 @@ Ext.define('Ext.data.proxy.WebStorage', {
         }
     },
 
-    /**
+    /**
      * @private
      * Fetches a model instance from the Proxy by ID. Runs each field's decode function (if present) to decode the data
      * @param {String} id The record's unique ID
@@ -211,7 +225,7 @@ Ext.define('Ext.data.proxy.WebStorage', {
         return this.cache[id];
     },
 
-    /**
+    /**
      * Saves the given record in the Proxy. Runs each field's encode function (if present) to encode the data
      * @param {Ext.data.Model} record The model instance
      * @param {String} id The id to save the record under (defaults to the value of the record's getId() function)
@@ -254,7 +268,7 @@ Ext.define('Ext.data.proxy.WebStorage', {
         obj.setItem(key, Ext.encode(data));
     },
 
-    /**
+    /**
      * @private
      * Physically removes a given record from the local storage. Used internally by {@link #destroy}, which you should
      * use instead because it updates the list of currently-stored record ids
@@ -277,7 +291,7 @@ Ext.define('Ext.data.proxy.WebStorage', {
         me.getStorageObject().removeItem(me.getRecordKey(id));
     },
 
-    /**
+    /**
      * @private
      * Given the id of a record, returns a unique string based on that id and the id of this proxy. This is used when
      * storing data in the local storage object and should prevent naming collisions.
@@ -292,7 +306,7 @@ Ext.define('Ext.data.proxy.WebStorage', {
         return Ext.String.format("{0}-{1}", this.id, id);
     },
 
-    /**
+    /**
      * @private
      * Returns the unique key used to store the current record counter for this proxy. This is used internally when
      * realizing models (creating them when they used to be phantoms), in order to give each model instance a unique id.
@@ -302,7 +316,7 @@ Ext.define('Ext.data.proxy.WebStorage', {
         return Ext.String.format("{0}-counter", this.id);
     },
 
-    /**
+    /**
      * @private
      * Returns the array of record IDs stored in this Proxy
      * @return {Array} The record IDs. Each is cast as a Number
@@ -323,7 +337,7 @@ Ext.define('Ext.data.proxy.WebStorage', {
         return ids;
     },
 
-    /**
+    /**
      * @private
      * Saves the array of ids representing the set of all records in the Proxy
      * @param {Array} ids The ids to set
@@ -339,7 +353,7 @@ Ext.define('Ext.data.proxy.WebStorage', {
         }
     },
 
-    /**
+    /**
      * @private
      * Returns the next numerical ID that can be used when realizing a model instance (see getRecordCounterKey). Increments
      * the counter.
@@ -362,7 +376,7 @@ Ext.define('Ext.data.proxy.WebStorage', {
         return id;
     },
 
-    /**
+    /**
      * @private
      * Sets up the Proxy by claiming the key in the storage object that corresponds to the unique id of this Proxy. Called
      * automatically by the constructor, this should not need to be called again unless {@link #clear} has been called.
@@ -372,7 +386,7 @@ Ext.define('Ext.data.proxy.WebStorage', {
         storageObject.setItem(this.id, storageObject.getItem(this.id) || "");
     },
 
-    /**
+    /**
      * Destroys all records stored in the proxy and removes all keys and values used to support the proxy from the storage object
      */
     clear: function() {
@@ -391,7 +405,7 @@ Ext.define('Ext.data.proxy.WebStorage', {
         obj.removeItem(this.id);
     },
 
-    /**
+    /**
      * @private
      * Abstract function which should return the storage object that data will be saved to. This must be implemented
      * in each subclass.
@@ -402,4 +416,6 @@ Ext.define('Ext.data.proxy.WebStorage', {
         Ext.Error.raise("The getStorageObject function has not been defined in your Ext.data.proxy.WebStorage subclass");
         //</debug>
     }
-});
\ No newline at end of file +});
+ +