cancel
Showing results for 
Search instead for 
Did you mean: 

SetData and LoadData together for JSONModel

Former Member
0 Kudos

Hello SAP gurus!

I need your help to answer a very simple question as for me, but I can't find the right answer.

I have the following coding in my SAP UI5 application Controller:

var data1 = {
	"myDate": new Date()
	};


oModel.loadData("products.json");

oModel.setData(data1);
myView.setModel(oModel);

Where products.json - just a simple data table.

And I can see only products.json data on the screen as a result, and myDate with empty value inside oModel(checked in debugg).

In case I comment loadData string, myDate value is on the screen and looks good.

How I can use them together? What is the best practise for such cases?

Thansk you a lot in advanse!

Accepted Solutions (0)

Answers (0)