Skip to Content
0

Second call of "SetProperty" for ODATA Model is not working

Sep 29, 2017 at 12:38 PM

122

avatar image
Former Member

Hi Experts,

I have a problem. I use OData Model (v2) as default model for my fiori application. it uses two-way binding. I also have a few controls, bind to the contexts of this model. When i change the data directly in controls (input fields) then all is working fine. But sometimes i need to change the data in model using "setProperty" method. It works perfectly once, but when i try to use this method second time, then it doesn;t work anymore... I should call submitChanges, and only then i will able to use setProperty once again. Does anybody know what is the reason of that behavior? And how can i fix it?

Best Regards,

Mikhail

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

avatar image
Former Member Oct 02, 2017 at 12:41 PM
0

Hi,

Do you try refresh() function ?

Regards,

Hedi

Share
10 |10000 characters needed characters left characters exceeded
A K Oct 03, 2017 at 06:18 AM
0

It depends on how you set the property. for eg::

case1: JS view -> in this case you should make sure "this" refers to view or not

case2: XML view-> in this case "this" refers to view, definitely your changes will reflect back.

case3: Refresh the model by using refresh(true) property

Share
10 |10000 characters needed characters left characters exceeded