0
votes

I have a sap.m.table which is binded to a JSON "TRIP" model.

Each row of the table got a change button, that opens up a dialog to change the value for columns for that particular row. On change button click i am saving the original values in "temp" JSON model.

There is a cancel button to close the change dialog,

On cancel button i am getting the original values from "temp" JSON model and setting the values by setProperty() in the "TRIP" JSOn model. As soon as any values are manually changed in the dialog both of the models "TRIP" JSON model and "temp" JSOn model are getting updated with the new values.

I am not able to get the original values from anywhere. I have also tried to do oneway binding on the temp json model but it didn't work.

Please suggest what should i do to store the original values.

Thanks .

1

1 Answers

0
votes

I have use $.extend to clone the temp model.

It has solved the problem.