length( successCallback, errorCallback ) method

This function gets the length of the store.

The length of a store is the number of key/value pairs that are in the store.

Syntax

length( successCallback, errorCallback )

Parameters

Name Type Description
successCallback sap.EncryptedStorage~lengthSuccessCallback If successful, the successCallback is invoked with the length of the store as the parameter.
errorCallback sap.EncryptedStorage~errorCallback If there is an error, the errorCallback is invoked with an ErrorInfo object as the parameter.

Example

var store = new sap.EncryptedStorage("storeName", "storePassword");
var successCallback = function(length) {
   alert("Length is " + length);
}
var errorCallback = function(error) {
   alert("An error occurred: " + JSON.stringify(error));
}
store.length(successCallback, errorCallback);

Source

encryptedstorage.js, line 45.