Client Data Bag API
The EPCF client data bag API provides methods to store data in a transient data buffer on the client.
EPCM.storeClientData(nameSpace, name, value)
This method saves data in value under a key. The key is generated by combining the parameters nameSpace and name. If the key already exists, the stored data will be overwritten.
|
Parameter |
Type |
Description |
|---|---|---|
|
nameSpace |
String |
URN for the first part of the key under which the data is stored. nameSpace will be combined with name. |
|
name |
String |
This name, combined with namespace, creates the key under which the data is stored. |
|
value |
String |
Data to be stored. |
Usage
<SCRIPT language="JavaScript"> var selectedPerson = "Tim Taylor" EPCM.storeClientData( "urn:com.sap.myObjects", "person", selectedPerson ); </SCRIPT>
EPCM.loadClientData(nameSpace, name)
This method returns the data stored under the specified key as String. The key is generated by a combination of the parameters nameSpace and name. If the key does not exist, the method returns null
|
Parameter |
Type |
Description |
|---|---|---|
|
nameSpace |
String |
URN for the first part of the key from which the data is reloaded. nameSpace will be combined with name. |
|
name |
String |
This name, combined with namespace, is the key from which the data is reloaded. |
Usage
<SCRIPT language ="JavaScript"> var selectedPerson = "Tim Taylor" EPCM.storeClientData( "urn:com.sap.myObjects", "person", selectedPerson ); </SCRIPT>
deleteClientData(nameSpace, name)
This method deletes the data stored under the specified key and the key itself. The key is generated by a combination of the parameters nameSpace and name.
|
Parameter |
Type |
Description |
|---|---|---|
|
nameSpace |
String |
URN for the first part of the key which is. nameSpace will be combined with name. |
|
name |
String |
This name, combined with namespace, is the key from which is deleted. |
Usage
<SCRIPT language ="JavaScript"> EPCM.deleteClientData( "urn:com.sap.myObjects", "person" ); </SCRIPT>