cancel
Showing results for 
Search instead for 
Did you mean: 

Best way to pass data between apps on a launchpad?

jprovost
Explorer

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?

Accepted Solutions (1)

Accepted Solutions (1)

CristianBabei
Contributor

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

Answers (0)