|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sencha.gxt.state.client.StateManager
public abstract class StateManager
This is the global state manager. In order for this class to be useful, it must be initialized with a provider when your application initializes. By default, GXT initializes the StateManager with a CookieProvider. The provider can be replaced as needed. The Provider is treated as an asynchronous String persistence mechanism, as to be compatible with RPC, RequestFactory, Cookies, and HTML5 storage. The StateManager then has tools to map these strings to and from bean-like interfaces, using AutoBeans.
| Constructor Summary | |
|---|---|
StateManager()
|
|
| Method Summary | ||
|---|---|---|
void |
clear(String name)
Clears the state bean. |
|
static StateManager |
get()
Returns the singleton instance. |
|
|
get(String name,
Class<T> stateBeanType,
Callback<T,Throwable> callback)
Returns a state bean. |
|
|
getDefaultStateInstance(Class<S> stateType)
Returns the default state instance. |
|
Provider |
getProvider()
Returns the manager's state provider. |
|
|
set(String name,
T stateBean)
Sets a state bean. |
|
void |
setProvider(Provider stateProvider)
Sets the manager's state provider. |
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StateManager()
| Method Detail |
|---|
public static StateManager get()
public void clear(String name)
name - the bean name
public <T> void get(String name,
Class<T> stateBeanType,
Callback<T,Throwable> callback)
T - the state bean typename - the bean namestateBeanType - the state bean classcallback - the callbackpublic <S> S getDefaultStateInstance(Class<S> stateType)
S - the state typestateType - the state class
public Provider getProvider()
public <T> void set(String name,
T stateBean)
T - the state bean typename - the bean namestateBean - the state beanpublic void setProvider(Provider stateProvider)
stateProvider - the provider
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||