on ‎2017 Aug 25 1:17 PM
Hi Experts,
I have implemented a very simple app for testing purposes with a simple responsive table containing Usernames and E-Mail Addresses:

The controller logic is very simple, too. It just contains the button event handlers.

The table data is coming from an ABAP Back-End and I used an Odata Model with Two-Way binding to bind the list. When updating single properties of the existing lines (e.g. E-Mail Address) the Back-End update works fine. My Save Button Event handler simply submits all changes (see listing above). Now I want to add several lines at once and submit them all together. No Record in the back-end can be created before at least the key field "Username" was entered by the user. When pressing the "Add" button my logic actually adds new lines:

When I enter new data in these new lines and submit the changes everything is persisted correctly. But: If I apply any changes to the old lines (originally coming from the BE) the lines vanish. I did some debugging and the model update caused by the changes of the existing lines triggers a refresh of the list binding of the table. All table lines that did not come originally from the BE are removed. The same happens when I change the odata service to One-Way Binding and I call any setProperty Method at the model. So, it's not an issue with the Two-Way Binding.
Does anyone have an idea how to overcome this issue?
Regards
Tobias
Request clarification before answering.
directly adding a line to the table is not supported by odatamodel, if my memory is right.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 8 | |
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.