Skip to Content
0

Refresh/update custom control in sapui5 when model change

Sep 01, 2017 at 12:37 PM

143

avatar image
Former Member

I've a custom control which have multiple properties inserted in Detail View page. I've binded data with these properties. Scenario is I've two pages one is list view and then detail view. I've to navBack from detail page and select diff product from main page.Detail view page show diff products detail according to selected product. everything works fine. but problem is that my custom control doesn't update values and other page have updated values.

<custom:product topic="" subTopic="{product>name}" id="productDetial"></custom:product>
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
avatar image
Former Member
Sep 04, 2017 at 04:11 PM
0
setSubTopic: function(sText){
        this.setProperty("subTopic", sText, true);
        $("#"+this.sId+" .leftTileYourScore").html(sText);
    }

I found the solution of above problem. Just I've to call the setProperty Method in my control.js file. and change inside Html after each time rendering

Share
10 |10000 characters needed characters left characters exceeded
Ravi kiran R Sep 04, 2017 at 10:02 AM
1

Hi Nafees,

Check if the model associated with the custom control is available and also getting updated,

Like, "oEvent.getSource().getModel('Model_Name')".

Regards,

Ravikiran

Share
10 |10000 characters needed characters left characters exceeded