Clear Up
SharpKit Reference

Ext.state Namespace

Download SDK: SharpKit.ExtJs.zip

Classes

Name Description
CookieProvider

A Provider implementation which saves and retrieves state via cookies. The CookieProvider supports the usual cookie options, such as:

  • path
  • expires
  • domain
  • secure

Example:

  
var cp = Ext.create('Ext.state.CookieProvider', {
            path: "/cgi-bin/",
            expires: new Date(new Date().getTime()+(1000*60*60*24*30)), //30 days
            domain: "sencha.com"
            });
            Ext.state.Manager.setProvider(cp);
            
CookieProviderConfig
CookieProviderEvents
LocalStorageProvider

A Provider implementation which saves and retrieves state via the HTML5 localStorage object. If the browser does not support local storage, an exception will be thrown upon instantiating this class.

LocalStorageProviderConfig
LocalStorageProviderEvents
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:

  
// in your initialization function
            init : function(){
            Ext.state.Manager.setProvider(new Ext.state.CookieProvider());
            }
            

This class passes on calls from components to the underlying Ext.state.Provider so that there is a common interface that can be used without needing to refer to a specific provider instance in every component.

ManagerConfig
ManagerEvents
Provider

Abstract base class for state provider implementations. The provider is responsible for setting values and extracting values to/from the underlying storage source. The storage source can vary and the details should be implemented in a subclass. For example a provider could use a server side database or the browser localstorage where supported.

This class provides methods for encoding and decoding typed variables including dates and defines the Provider interface. By default these methods put the value and the type information into a delimited string that can be stored. These should be overridden in a subclass if you want to change the format of the encoded value and subsequent decoding.

ProviderConfig
ProviderEvents
StatefulConfig
StatefulEvents

Interfaces

Name Description
Stateful

A mixin for being able to save the state of an object to an underlying Ext.state.Provider.

© Copyright 2005-2011 SharpKit. All rights reserved.