CIB webRec technical documentation

CIB webRec and remote document storage

webRec.loadFromStorage() call

Call webrec with a json representation of the Class with the full qualified name as 'class' parameter or the name of the connector in the webrec configuration as 'connector' parameter:

Specifying connector using class name:

function loadDocument() {
   webRec().loadFromStorage('{ "class":
"de.cib.webrec.backend.service.document.MockStorageConnector", "documentId": 121003}')
     .then(function () {
       console.log('Document is loaded');
     }).catch(function(error) {
       console.log('Failed to load document, Reason: ' + error.message)
       webRec().newDoc('');
     });
}

Here is a sample to open document:

function loadDocument() {
   webRec().loadFromStorage('{ "connector": "ConnectorName", "documentId": 121003}')
     .then(function () {
       console.log('Document is loaded');
     }).catch(function(error) {
       console.log('Failed to load document, Reason: ' + error.message)
       webRec().newDoc('');
     });
}