Skip to Content

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

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

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

    Hi,

    Do you try refresh() function ?

    Regards,

    Hedi

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 03, 2017 at 06:18 AM

    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

    Add comment
    10|10000 characters needed characters exceeded