clear( successCallback, errorCallback ) method

This function removes all items from the store.

If there are no items in the store in the first place, that is still counted as a success.

Syntax

clear( successCallback, errorCallback )

Parameters

Name Type Description
successCallback sap.EncryptedStorage~successCallback If successful, the successCallback is invoked with no parameters.
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() {
   alert("Store cleared!");
}
var errorCallback = function(error) {
   alert("An error occurred: " + JSON.stringify();
}
store.clear(successCallback, errorCallback);

Source

encryptedstorage.js, line 229.