Class Ext.state.Manager
Package: | Ext.state |
Defined In: | StateManager.js |
Class: | Manager |
Extends: | Object |
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:
// in your initialization function
init : function(){
Ext.state.Manager.setProvider(new Ext.state.CookieProvider());
var win = new Window(...);
win.restoreState();
}
This class is a singleton and cannot be created directly.
Public Properties
This class has no public properties.
Public Methods
|
clear( String name ) : void
Clears a value from the state
Clears a value from the state
Parameters:
name : StringThe key name
Returns:
|
Manager |
|
get( String name , Mixed defaultValue ) : Mixed
Returns the current value for a key
Returns the current value for a key
|
Manager |
|
getProvider() : Provider
Gets the currently configured state provider
Gets the currently configured state provider
Parameters:
Returns:
Provider The state provider
|
Manager |
|
set( String name , Mixed value ) : void
Sets the value for a key
Sets the value for a key
Parameters:
name : StringThe key name value : MixedThe state data
Returns:
|
Manager |
|
setProvider( Provider stateProvider ) : void
Configures the default state provider for your application
Configures the default state provider for your application
|
Manager |
Public Events
This class has no public events.