Roo.state.Provider Roo.state.CookieProvider
Package: | Roo.state |
Defined In: | Roo/state/CookieProvider.js. |
Class: | CookieProvider |
Extends: | Roo.state.Provider |
var cp = new Roo.state.CookieProvider({
path: "/cgi-bin/",
expires: new Date(new Date().getTime()+(1000*60*60*24*30)); //30 days
domain: "roojs.com"
})
Roo.state.Manager.setProvider(cp);
Options | Defined By | |
---|---|---|
domain : String
The domain to save the cookie for.
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, or simply the domain itself like 'roojs.com' to include all sub-domains if you need to access cookies across different sub-domains (defaults to null which uses the same domain the page is running on including the 'www' like 'www.roojs.com') |
Roo.state.CookieProvider | |
expires : Date
The cookie expiration date (defaults to 7 days from now)
The cookie expiration date (defaults to 7 days from now)
|
Roo.state.CookieProvider | |
path : String
The path for which the cookie is active (defaults to root '/' which makes it active for all pages in the site)
The path for which the cookie is active (defaults to root '/' which makes it active for all pages in the site)
|
Roo.state.CookieProvider | |
secure : Boolean
True if the site is using SSL (defaults to false)
True if the site is using SSL (defaults to false)
|
Roo.state.CookieProvider |
Method | Defined By | |
---|---|---|
new Roo.state.CookieProvider
(Object config)
Create a new Roo.state.CookieProvider
Create a new Roo.state.CookieProvider
|
||
clear
(String name)
Clears a value from the state
Clears a value from the state
|
Roo.state.Provider | |
decodeValue
(String value)
:
Mixed
Decodes a string previously encoded with {link encodeValue}.
Decodes a string previously encoded with {link encodeValue}.
|
Roo.state.Provider | |
encodeValue
(Mixed value)
:
String
Encodes a value including type information.
Encodes a value including type information. Decode with {link decodeValue}.
|
Roo.state.Provider | |
get
(String name, Mixed defaultValue)
:
Mixed
Returns the current value for a key
Returns the current value for a key
|
Roo.state.Provider | |
set
(String name, Mixed value)
Sets the value for a key
Sets the value for a key
|
Roo.state.Provider |
Event | Defined By | |
---|---|---|
Roo.state.Provider |