Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

beforeShow event being wrongly called?

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?

replied

Are you called onBeforeShow in Detail onInit() like this,

Passing value from List to detail in UI5 mobile... | SCN

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question