cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

updatebinding in list control

GowthamRaja
Active Participant
0 Likes
759

Hi Experts,

I have a master detail app, in my detail page, i have a list control and grid container. i can drag and drop an item from list to grid and do vice versa as below

When i click an item in master page and click GETDETAILS button, it should load the json file(which has same fields as list control but values only changed) and update the list and grid controls. i.e. as per json file it should update the count field alone but it is inserting all the records in json file to list like below

but actual expectation

My JS code after clicking Get Details button

	this.oNewListModel = new JSONModel();
this.oNewListModel.loadData(sap.ui.require.toUrl("com/sap/model/K84.json"), null, false);
this.byId("list1").setModel(new JSONModel(this.oNewListModel.getData().AppCollection));
this.oNewListModel.updateBindings(true);

Please help how to fix this.

Accepted Solutions (0)

Answers (1)

Answers (1)

NilsJanen
Participant
0 Likes

Try substituting

this.byId("list1").setModel(new JSONModel(this.oNewListModel.getData().AppCollection));

for

this.byId("list1").setModel(this.oNewListModel);