Skip to Content
avatar image
Former Member

UI5 Control refresh after model update

We are using an oData model which is bound to the view. After the binding of the UI has taken place we are trying to update the binding of the model by doing: oModel.setProperty(). This change is not reflected in the UI. We have tried refreshing the list items and refreshing the model after the change, but both of these options call the backend (again) which degrades the performance.

I thought an update to the model should automatically update the control but it is not working in this case.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Aug 22, 2017 at 02:32 PM

    Hi Sarah,

    Can you please share your view code?

    Add comment
    10|10000 characters needed characters exceeded

  • Aug 22, 2017 at 01:25 PM

    are you assigning the correct property like:

    oModel.setProperty('/<property>', propertyValue);

    ?

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 22, 2017 at 01:32 PM

    Yes, it looks like this:

    oModel.setProperty(aPaths[iIterator] + "/Photo", "sap-icon://person-placeholder");

    After that line in the debugger I can check the model oData and the property is there. I have it bound in the view {Photo}.

    Add comment
    10|10000 characters needed characters exceeded