com.sencha.gxt.state.client
Class CookieProvider

java.lang.Object
  extended by com.sencha.gxt.state.client.Provider
      extended by com.sencha.gxt.state.client.CookieProvider

public class CookieProvider
extends Provider

The default Provider implementation which saves state via cookies.


Constructor Summary
CookieProvider(String path, Date expires, String domain, boolean secure)
          Creates a new cookie provider
 
Method Summary
 void clear(String name)
          Clears the named value.
 void getValue(String name, Callback<String,Throwable> callback)
          Returns the value asynchronously.
 void set(String name, String value, Date expires)
           
 void setValue(String name, String value)
          Sets the value.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CookieProvider

public CookieProvider(String path,
                      Date expires,
                      String domain,
                      boolean secure)
Creates a new cookie provider

Parameters:
path - The path for which the cookie is active (defaults to root '/' which makes it active for all pages in the site)
expires - the cookie expiration date (defaults to 7 days from now)
domain - The domain to save the cookie for. Note that you cannot specify a different domain than your page is on, but you can specify a sub-domain.
secure - true if the site is using SSL
Method Detail

clear

public void clear(String name)
Description copied from class: Provider
Clears the named value.

Overrides:
clear in class Provider
Parameters:
name - the property name

getValue

public void getValue(String name,
                     Callback<String,Throwable> callback)
Description copied from class: Provider
Returns the value asynchronously.

Specified by:
getValue in class Provider
Parameters:
name - the property name
callback - the callback

setValue

public void setValue(String name,
                     String value)
Description copied from class: Provider
Sets the value.

Specified by:
setValue in class Provider
Parameters:
name - the property name
value - the value

set

public void set(String name,
                String value,
                Date expires)


Copyright © 2012. All Rights Reserved.