cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (2)

Answers (2)

karthikarjun
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Hi,

Do you try refresh() function ?

Regards,

Hedi