namespace jQuery.sap.storage

Control sample: jQuery.sap.storage
Visiblity: public
Available since: N/A
Module: jquery.sap.storage
Application Component: CA-UI5-COR

Returns a Storage object for a given HTML5 storage (type) and, as a convenience, provides static functions to access the default (session) storage.

When called as a function, it returns an instance of jQuery.sap.storage.Storage, providing access to the storage of the given jQuery.sap.storage.Type or to the given HTML5 Storage object.

The default session storage can be easily accessed with methods jQuery.sap.storage.get, jQuery.sap.storage.put, jQuery.sap.storage.remove, jQuery.sap.storage.clear, jQuery.sap.storage.getType and jQuery.sap.storage.removeAll


Nodes Overview

Node Description
jQuery.sap.storage.Storage

A Storage API for JavaScript.

jQuery.sap.storage.Type

Enumeration of the storage types supported by jQuery.sap.storage.Storage


Methods Overview

Method Description
jQuery.sap.storage.clear

Deletes all the entries saved in the session (Independent of the current Storage instance!).

CAUTION: This method should be called only in very particular situations, when a global erasing of data is required. Given that the method deletes the data saved under any ID, it should not be called when managing data for specific controls.

jQuery.sap.storage.get

Retrieves the state string stored in the session under the key sStorageKeyPrefix + sId.

sStorageKeyPrefix is the id prefix defined for the storage instance (@see jQuery.sap#storage)

jQuery.sap.storage.getType

Returns the type of the storage.

jQuery.sap.storage.isSupported

Returns whether the given storage is suppported.

jQuery.sap.storage.put

Stores the passed state string in the session, under the key sStorageKeyPrefix + sId.

sStorageKeyPrefix is the id prefix defined for the storage instance (@see jQuery.sap#storage)

jQuery.sap.storage.remove

Deletes the state string stored in the session under the key sStorageKeyPrefix + sId.s

sStorageKeyPrefix is the id prefix defined for the storage instance (@see jQuery.sap#storage)

jQuery.sap.storage.removeAll

Deletes all state strings stored in the session under the key prefix sStorageKeyPrefix + sIdPrefix.

sStorageKeyPrefix is the id prefix defined for the storage instance (@see jQuery.sap#storage)

jQuery.sap.storage.clear

Deletes all the entries saved in the session (Independent of the current Storage instance!).

CAUTION: This method should be called only in very particular situations, when a global erasing of data is required. Given that the method deletes the data saved under any ID, it should not be called when managing data for specific controls.

Param Type DefaultValue Description

jQuery.sap.storage.get

Retrieves the state string stored in the session under the key sStorageKeyPrefix + sId.

sStorageKeyPrefix is the id prefix defined for the storage instance (@see jQuery.sap#storage)

Param Type DefaultValue Description
sId string

Id for the state to retrieve

jQuery.sap.storage.getType

Returns the type of the storage.

Param Type DefaultValue Description

jQuery.sap.storage.isSupported

Returns whether the given storage is suppported.

Param Type DefaultValue Description

jQuery.sap.storage.put

Stores the passed state string in the session, under the key sStorageKeyPrefix + sId.

sStorageKeyPrefix is the id prefix defined for the storage instance (@see jQuery.sap#storage)

Param Type DefaultValue Description
sId string

Id for the state to store

sStateToStore string

content to store

jQuery.sap.storage.remove

Deletes the state string stored in the session under the key sStorageKeyPrefix + sId.s

sStorageKeyPrefix is the id prefix defined for the storage instance (@see jQuery.sap#storage)

Param Type DefaultValue Description
sId string

Id for the state to delete

jQuery.sap.storage.removeAll

Deletes all state strings stored in the session under the key prefix sStorageKeyPrefix + sIdPrefix.

sStorageKeyPrefix is the id prefix defined for the storage instance (@see jQuery.sap#storage)

Param Type DefaultValue Description
sIdPrefix string

Id prefix for the states to delete