Skip to Content
Former Member
Dec 15, 2016 at 01:51 PM

Detail view does not reload when a new item is clicked in the master view (SAPUI5)


HI I am working on a split App where I am having a list of business partners in the master view which when clicked displays the details in the Detail View. It works well for the first partner clicked but remains as is when we click any other partner in the master list.

I am using the below code in my master controller onclick event to navigate to the detail view on click of the partner number.

1. var context = oEvent.getSource().getBindingContext(); 
2."Detail", context);

During the first click, i observe that after statement 2, the detail controller is being called which renders the entire detail view and so we get the data, but on the next click, the statement 2 doesn't re-render the detail view as it already exists and so the data isn't being reloaded.

I tried manually reloading the detail view, destroying it and none of them worked.

var oView = sap.ui.view({
       viewName: "sap.ui.demo.MyFiori.Detail",
           type: sap.ui.core.mvc.ViewType.XML

Can someone please give me a solution for this.