I get three pending changes from oModel.getPendingChanges(), oModel is sap.ui.model.odata.v2.ODataModel
{
{
ASet('id1') : {id: 1}
},
{
BSet('id1') : {id: 1}
},
{
CSet('id1') : {id: 1}
}
}
I just want submit ASet. B and C changes is from ComboBox select. I have three ComboBoxes that are related to each other. I used binding to solve that.
<ComboBox
id="theSecondSelect"
selectionChange="onChange"
enabled="false"
showSecondaryValues="true"
value="{
path: 'propertySetId',
type: '.Utils.mandatoryValueType'}">
</ComboBox>
<items> is dynamically binding in controller.
I've even tried
for(var sBindingPath in oChanges) {
if(sBindingPath.indexOf("ASet") === -1) {
delete oModel.mChangedEntities[sBindingPath];
}
}
console.log(oModel.getPendingChanges());
I can see that pending changes has already been deleted, but the three requests still sent.
Any suggestion?
Update:
Remove pending changes by
_resetSelectChanges: function() {
var oChanges = this._oModel.getPendingChanges();
for (var sBindingPath in oChanges) {
if (sBindingPath.indexOf("ControlIoTImplementationSet") === -1) {
this._oModel.resetChanges(["/" + sBindingPath]);
}
}
}
But it will appear again after I close the form dialog.

