on 08-03-2015 7:42 PM
Hello everyone,
I'm using a SplitApp and passing data (Master - > Detail) like this:
handleListSelect: function() {
var app = sap.ui.getCore().byId("app");
var oContext = {};
var start = sPath.lastIndexOf("=") + 1;
oContext.listId = sPath.substring(start, sPath.length - 1);
app.toDetail("detailId", "show", oContext);
}
The SplitApp documentation OpenUI5 SDK - Demo Kit
"The "beforeShow" event on the target page will contain this data object as "data" property. "
So I've tried to call on my detail view the beforeShow
beforeShow: function(oEvent){
var detail= oEvent.data.oContext;
sap.m.MessageBox.alert(detail);
console.log(detail);
}
It seems that this function it's just being ignored when I run the application, no console or alert messages are shown. ( toDetail function still directs me to the Detail page and all the other functions run ok )
I've seen that are methods like onBeforeShow and I've tried to use them instead, but still isn't called.
Also only tried to console log oEvent.data to see what properties it had, but nothing was called.
Is the SplitApp documentation outdated or there is something wrong in the way I'm calling it?
Are you called onBeforeShow in Detail onInit() like this,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
if i understood your quest properly, here is the ans,
In master controller,
var masterVal = //get the value to be passed to detail.
app.to(screen, {masterVal : masterVal });
in detail oninit before show method,
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.