Skip to Content
0
Sep 20, 2017 at 01:22 PM

Getting and setting the default Model once another has been setup

47 Views

My issue is that I have a default model specified in my manifest.json file as "".

However, I'm also setting up a view model in my controller.

var oModel = new JSONModel({

questions: [{ order: 1,

title: "",

criteria: "", }]

});

this.getView().setModel(oModel);

How do I restore set the view model back to the default model? Is it simply a case of

this.getView().setModel("");

I'm asking because the default model is the service that contains all my read/writes.