Discard deprecated Responses of previous JSONModel.loadData()-Calls
Hi,
i have an issue with the JSONModel (but the same applies to the XMLModel):
var model = new sap.ui.model.json.JSONModel();
//the user selects a master item that loads a very long detail list
model.loadData("/resource_taking_5_seconds_to_answer"); //long list
//after 2 seconds the user selects an other master item that loads an much shorter detail list
model.loadData("/resource_taking_1_seconds_to_answer"); //short list
//The response of the first slow request overwrites the data of the faster second request!
The JSONModel.loadData()-Method should only accept the response of the last issued ajax request when merge = false.
Yes, i could use $.ajax() and handle this my self as a workaround. But i think the JSONModel.loadData() should do it right.
As a possible solution, i would clear the this.aPendingRequestHandles in ClientModel line 116 when the merge option is false.
Have a nice day, Bernhard
Hi,
yes, this sounds like a bug. I opened internal ticket 1570846343 for it for tracking.
Thanks and regards Andreas
Hi, we'll change the behaviour with 1.38. The sync data loading does not change, but we sequentialize async requests. BR, Jan
Should be this commit: https://github.com/SAP/openui5/commit/5f983a527d651214a9f6734ae5119acc6b684421