Skip to Content
0

toDetail() method of sap.m.SplitContainer

Jul 10, 2017 at 08:34 AM

43

avatar image
Former Member

Hello UI5 experts,

I am trying to read the data in list data of master view and passing it to detail page. In the document of toDetail() method of SplitApp control, it is mentioned that we can pass oData and it will be available in beforeShow event on target page. How to capture the data that I am passing in target page?

capture7.jpg

Thanks..

capture7.jpg (93.1 kB)
capture7.jpg (93.1 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
avatar image
Former Member Jul 10, 2017 at 11:33 AM
0

I couldn't find a way to use beforeShow() method, but managed to transfer the data from one view to other by following approach:

var oContext = oEvent.getParameters().listItem.getBindingContext();
var oObject = oContext.getObject();

var oEvalPage = sap.ui.getCore().byId("idEvalView1");
oEvalPage.setBindingContext(oContext, 'Navigation');

And in detail view:

var oEvalPage = sap.ui.getCore().byId("idEvalView1");
var oContext = oEvalPage.getBindingContext('Navigation');
var oObject = oContext.getObject();
Share
10 |10000 characters needed characters left characters exceeded