3
* Copyright(c) 2006-2008, Ext JS, LLC.
6
* http://extjs.com/license
10
* @class Ext.state.Manager
11
* This is the global state manager. By default all components that are "state aware" check this class
12
* for state information if you don't pass them a custom state provider. In order for this class
13
* to be useful, it must be initialized with a provider when your application initializes. Example usage:
15
// in your initialization function
17
Ext.state.Manager.setProvider(new Ext.state.CookieProvider());
18
var win = new Window(...);
24
Ext.state.Manager = function(){
25
var provider = new Ext.state.Provider();
29
* Configures the default state provider for your application
30
* @param {Provider} stateProvider The state provider to set
32
setProvider : function(stateProvider){
33
provider = stateProvider;
37
* Returns the current value for a key
38
* @param {String} name The key name
39
* @param {Mixed} defaultValue The default value to return if the key lookup does not match
40
* @return {Mixed} The state data
42
get : function(key, defaultValue){
43
return provider.get(key, defaultValue);
47
* Sets the value for a key
48
* @param {String} name The key name
49
* @param {Mixed} value The state data
51
set : function(key, value){
52
provider.set(key, value);
56
* Clears a value from the state
57
* @param {String} name The key name
59
clear : function(key){
64
* Gets the currently configured state provider
65
* @return {Provider} The state provider
67
getProvider : function(){
b'\\ No newline at end of file'