X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/25ef3491bd9ae007ff1fc2b0d7943e6eaaccf775..c8256059947f3aa8f5b0a9a2acf55e2142bb4742:/docs/source/StateManager.html diff --git a/docs/source/StateManager.html b/docs/source/StateManager.html index e4a7fdbf..f91466c1 100644 --- a/docs/source/StateManager.html +++ b/docs/source/StateManager.html @@ -1,78 +1,79 @@
+/*! - * Ext JS Library 3.0.3 - * Copyright(c) 2006-2009 Ext JS, LLC + * Ext JS Library 3.2.1 + * Copyright(c) 2006-2010 Ext JS, Inc. * licensing@extjs.com * http://www.extjs.com/license */ -/** - * @class Ext.state.Manager - * This is the global state manager. By default all components that are "state aware" check this class - * for state information if you don't pass them a custom state provider. In order for this class - * to be useful, it must be initialized with a provider when your application initializes. Example usage: -+/** + * @class Ext.state.Manager + * This is the global state manager. By default all components that are "state aware" check this class + * for state information if you don't pass them a custom state provider. In order for this class + * to be useful, it must be initialized with a provider when your application initializes. Example usage: +- * @singleton - */ -Ext.state.Manager = function(){ - var provider = new Ext.state.Provider(); - - return { - /** - * Configures the default state provider for your application - * @param {Provider} stateProvider The state provider to set - */ - setProvider : function(stateProvider){ - provider = stateProvider; - }, - - /** - * Returns the current value for a key - * @param {String} name The key name - * @param {Mixed} defaultValue The default value to return if the key lookup does not match - * @return {Mixed} The state data - */ - get : function(key, defaultValue){ - return provider.get(key, defaultValue); - }, - - /** - * Sets the value for a key - * @param {String} name The key name - * @param {Mixed} value The state data - */ - set : function(key, value){ - provider.set(key, value); - }, - - /** - * Clears a value from the state - * @param {String} name The key name - */ - clear : function(key){ - provider.clear(key); - }, - - /** - * Gets the currently configured state provider - * @return {Provider} The state provider - */ - getProvider : function(){ - return provider; - } - }; -}();-// in your initialization function -init : function(){ - Ext.state.Manager.setProvider(new Ext.state.CookieProvider()); - var win = new Window(...); - win.restoreState(); -} -
+// in your initialization function
+init : function(){
+ Ext.state.Manager.setProvider(new Ext.state.CookieProvider());
+ var win = new Window(...);
+ win.restoreState();
+}
+
+ * @singleton
+ */
+Ext.state.Manager = function(){
+ var provider = new Ext.state.Provider();
+
+ return {
+ /**
+ * Configures the default state provider for your application
+ * @param {Provider} stateProvider The state provider to set
+ */
+ setProvider : function(stateProvider){
+ provider = stateProvider;
+ },
+
+ /**
+ * Returns the current value for a key
+ * @param {String} name The key name
+ * @param {Mixed} defaultValue The default value to return if the key lookup does not match
+ * @return {Mixed} The state data
+ */
+ get : function(key, defaultValue){
+ return provider.get(key, defaultValue);
+ },
+
+ /**
+ * Sets the value for a key
+ * @param {String} name The key name
+ * @param {Mixed} value The state data
+ */
+ set : function(key, value){
+ provider.set(key, value);
+ },
+
+ /**
+ * Clears a value from the state
+ * @param {String} name The key name
+ */
+ clear : function(key){
+ provider.clear(key);
+ },
+
+ /**
+ * Gets the currently configured state provider
+ * @return {Provider} The state provider
+ */
+ getProvider : function(){
+ return provider;
+ }
+ };
+}();
\ No newline at end of file