Skip to Content
0

Load fresh Detail page in sap.m.SplitApp master/detail layout

Jul 11, 2017 at 07:40 AM

133

avatar image
Former Member

Hello UI5 experts,

I have developed a custom UI5 application using SplitApp control. I am displaying list in the master page using sap.m.ObjectListItem. Upon clicking the item (itemPress), I am loading the detail page.

The issue that I am facing is, detail page is not loading with fresh data upon clicking the second item from list. Data related to first item is displayed always.

Thanks..

10 |10000 characters needed characters left characters exceeded
Former Member

I have seen Routing in explored section. But in that demo, two detail views are there to display data.

In my case, I have to refresh the same detail view with fresh data upon click of items in master page.

0
Former Member

In the Split App demo, SAP is handling the navigation between master and detail pages through "Routing". Can someone help me how to define Routing in manifest.json file and handle it in application. I am building my custom app on eclipse..!!

Master/Detail Demo App

Thanks..

0
* Please Login or Register to Answer, Follow or Comment.

4 Answers

Best Answer
avatar image
Former Member Jul 11, 2017 at 08:41 PM
0

Finally, Instead of Routing technique..I have loaded the OData service in event handler method [itemPress event of list] and then navigated to detail page. This solved my problem.

Share
10 |10000 characters needed characters left characters exceeded
Jun Wu Jul 11, 2017 at 08:53 AM
0

it is not the way to go.

check the demo app to see how sap did it.

Show 2 Share
10 |10000 characters needed characters left characters exceeded
Former Member

"Split App" Control has Master and Detail pages.

In master page - I am displaying list (we can use sap.m.StandardListItem or sap.m.ObjectListItem)

Now, upon clicking the list item, I am trying to navigate to detail page.

Which one is not correct in this approach?

0

loading a fresh detail page everytime

just check sap demo app

0
avatar image
Former Member Jul 11, 2017 at 10:21 AM
0

Remove the detail page from detailPage container.

this.getView().getParent().removeDetailPage("IDof the detailPage");

Show 2 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hello Devendra,

I think removeDetailPage() will remove detail page from aggregation but not killing the run time instance..

0
Former Member

Got it,

way 1

1) without routing : Upon clicking on itempress, update the model binded to detailPage in master page, as detailPage and masterPage can share a model if you set model at sap.ui.core.Core level(sap.ui.getCore()).

way 2

upon navigation pass the id to detailPage via routing, and update the binding by model.refresh() -- I think in v2 odata model gets refreshed automatically.

Hope this may help you.

1
avatar image
Former Member Jul 11, 2017 at 11:16 AM
0

In the Split App demo, SAP is handling the navigation between master and detail pages through "Routing". Can someone help me how to define Routing in manifest.json file and handle it in application. I am building my custom app on eclipse..!!

Master/Detail Demo App

Thanks..

Share
10 |10000 characters needed characters left characters exceeded