on 10-11-2018 4:07 PM
Hello everyone,
I need to persist data between different Fiori apps on a launchpad and I'm considering using a Web Storage API on the browser (https://sapui5.hana.ondemand.com/#/api/jQuery.sap.storage.Storage). The reason is that the apps are parts of a workflow in which we can't post in the standard tables until the last step of the workflow. We can't do it in one big app because some steps can be used independently or in a different workflow. So I would store the input data in a serialized JSON model which could then be retrieved by the other app (step) and bind controls on it. Is there any downsides on doing this?
By my experience, the best way is to define a model in the sap.ui.getCore().
var oViewModel = new sap.ui.model.json.JSONModel();
sap.ui.getCore().setModel(oViewModel);
After this, to set the data:
sap.ui.getCore().getModel().setData({
Data123: ["test"]
});
And for reading it after, on other app:
sap.ui.getCore().getModel().getData().Data123
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
9 | |
9 | |
8 | |
7 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.