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.
length( successCallback, errorCallback )
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. |
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);