on 03-20-2017 3:39 PM
Hi,
Am getting duplicate id error and table data hangs when navigating to item in master screen which has table in detail screen for which row is removed but not saved to backend.Am using odata binding in m.table.I have seen many example to remove selected row from table using splice function but this doesn't work for me since am using odata model.
error is:"Error: adding element with duplicate id '__icon0-__component0---detail--lineItemTable-0'"
Am using the below code to remove a selected row from table:-
deleteRow: function() { var oTable = this.getView().byId("lineItemTable"); var colLsit=this.getView().byId("lineItemColumnList"); var arrLength = this.getView().byId("lineItemTable").getSelectedContexts().length; var oItems = oTable.getItems(); if (arrLength > 0) { for (var j = oItems.length - 1; j >= 0; j--) { if (oItems[j].isSelected()) { oTable.removeItem(oItems[j]); } } } else { MessageToast.show(this.getResourceBundle().getText("selectitem")); } },
thanks for your time
Hi,
We have a scenario based on the table rows data,there is calacuation based on which user can either save it or ignore and move to next item in master list.
This error happens only when user move to othe item in master list without saving
Thanks,
Palani
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
just delete the record through odata model, the row will be deleted automatically
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
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.