Skip to Content
avatar image
Former Member

SetData and LoadData together for JSONModel

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!

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers