Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 3257

beforeShow event being wrongly called?

$
0
0

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?


Viewing all articles
Browse latest Browse all 3257

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>