Class R.storage.WindowStorage
Extends
R.storage.AbstractStorage.
R.storage.WindowStorage is used to maintain data in "window.name"
using a JSON object. This type of storage is transient and should be used as a
last resort when trying to store data.
Defined in: windowstorage.js.
Constructor Attributes | Constructor Name and Description |
---|---|
This class of storage is used to persist data on the window object's name
attribute.
|
Method Attributes | Method Name and Description |
---|---|
clear()
Clear all of the data
|
|
dispose()
Dispose of all of the data
|
|
Get the class name of this object
|
|
Initialize the storage object to the document.cookie object
|
|
load(key)
Get the value associated with the key from the window's name attribute storage.
|
|
release()
Release the object back into the object pool.
|
|
save(key, value)
Save a value to the window's name attribute storage.
|
- Methods borrowed from class R.storage.AbstractStorage:
- destroy, flush, getStorageObject, loadData, saveData, setStorageObject
- Methods borrowed from class R.engine.PooledObject:
- clearObjectDataModel, getId, getName, getObjectDataModel, getProperties, isDestroyed, setName, setObjectDataModel, toString, toXML
Class Detail
R.storage.WindowStorage()
This class of storage is used to persist data on the window object's name
attribute.
Method Detail
clear()
Clear all of the data
dispose()
Dispose of all of the data
{String}
getClassName()
Get the class name of this object
- Returns:
- {String} "R.storage.WindowStorage"
{Object}
initStorageObject()
Initialize the storage object to the document.cookie object
- Returns:
- {Object} The localStorage object
{Object}
load(key)
Get the value associated with the key from the window's name attribute storage.
- Parameters:
- key
- {String} The key to retrieve data for
- Returns:
- {Object} The value that was stored with the key, or null
release()
Release the object back into the object pool.
save(key, value)
Save a value to the window's name attribute storage.
- Parameters:
- key
- {String} The key to store the data with
- value
- {Object} The value to store with the key