A flag which causes the object to attempt to restore the state of
internal properties from a saved state on startup. The object must have
a stateId for state to be managed.
Auto-generated ids are not guaranteed to be stable across page loads and
cannot be relied upon to save and restore the same state for a object.
For state saving to work, the state manager's provider must have been
set to an implementation of Ext.state.Provider which overrides the
set and get
methods to save and recall name/value pairs. A built-in implementation,
Ext.state.CookieProvider is available.
To set the state provider for the current page:
expires: new Date(new Date().getTime()+(1000*60*60*24*7)), //7 days from now
A stateful object attempts to save state when one of the events
listed in the stateEvents configuration fires.
To save state, a stateful object first serializes its state by
The Component base class implements getState to save its width and height within the state
only if they were initially configured, and have changed from the configured value.
The Panel class saves its collapsed state in addition to that.
The Grid class saves its column state in addition to its superclass state.
If there is more application state to be save, the developer must provide an implementation which
first calls the superclass method to inherit the above behaviour, and then injects new properties
into the returned object.
The value yielded by getState is passed to Ext.state.Manager.set
which uses the configured Ext.state.Provider to save the object
keyed by the stateId.
During construction, a stateful object attempts to restore its state by calling
Ext.state.Manager.get passing the stateId
The resulting object is passed to applyState*. The default implementation of
applyState simply copies properties into the object, but a developer may
override this to support restoration of more complex application state.
You can perform extra processing on state save and restore by attaching
handlers to the beforestaterestore, staterestore,
beforestatesave and statesave events.
Defaults to: false