on 12-05-2018 3:08 PM
Hi Community,
I have a sap.m.Table bound to an entityset in the GW via ODataModel V2. The table displays 3 rows with data from the backend. There is a functionality to add a new row by clicking an add row button in the Table toolbar.
For this I am using the createEntry method as shown in the code below when clicking on the button. This works fine and the entry (row 4) is shown in the table. I can then enter values in the fields for this row.
However, if I now change the data of any of the previous rows, this newly created row (row 4) disappears from the table and I can see only the 3 existing rows. The data for the 4th row is still available in the mChangedEntities of the model. Its just that the newly created row disappears.
Does anyone have a clue how to resolve this ?
Note: The new row is submitted later to the backend using submitChanges.
var oContext = oModel.createEntry("/ManualPostBondsSet", {
properties : {
BusinessPartnerID: this._bpId,
}
});
var oItem = this._getItemsTemplate(); // Pvt. method to retrieve the ColumnListItem template
var oTable = this.getView().byId(sTableId);
if(oTable) {
oItem.setBindingContext(oContext, "modelName");
oTable.addItem(oItem);
}
Probably you've solved your issue by now or gave up, but I'm having the exactly same problem with no reasonable explanation...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I don't think you can make it with odatamodel.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can anyone provide some inputs ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.