Skip to Content
Former Member
Aug 02, 2014 at 12:43 PM

Problem on navigation in SplitApp, onBeforeShow only ran in the first time


Hi Experts,

I am new learner on SAPUI5, and I met a problem, I create a Page using SplitApp, the Default Master Page is a list, the Default Detail Page is a welcome page(Detail Page1), and when I click on the list on Master Page, the Detail Page will move to information page(Detail Page2).

The code in the index controller is:

onInit: function() { = sap.ui.getCore().byId("CustomerApp"); var bus = sap.ui.getCore().getEventBus();

bus.subscribe("nav", "to", this.navToHandler, this);

bus.subscribe("nav", "back", this.navBackHandler, this);


navToHandler : function(channelId, eventId, data) {

if (data && {

..., "slide", } }

The code in the information page(Detail Page2):


// not added the controller as delegate to avoid controller functions with similar names as the events

onBeforeShow : function(evt) {

if ( != null) {

//var secondViewModel = new sap.ui.model.json.JSONModel();



var DetailObjHeader = new sap.ui.getCore().byId("DetailObjHeader");





}, this );

When I click the list on Master Page for the first time, the Detail page move to the information page(Detail Page2) with the correct data binding.

However when I click on it on the second time, the binding data on Detail Page2 was not refresh, I debugged on the code, found that:

in the first time: after, "slide",, the method onBeforeShow in Detail Page2 will be triggered, then the program worked fine.

in the second time: after, "slide",, the method onBeforeShow in Detail Page2 would be never triggered again, unless I move the Detail Page1 then move to Detail Page2, the method onBeforeShow will be called again.

Anyone know how to solve the problem?

Thanks and Best regards,

Dylan Ding