Hi All,
I am new to the AppBuilder and SAPUI5 development. I am trying to build a tablet based app which has three views - Home
Page.view.html, newPage.view.html, newCustomer.view.html (all the three views being the general page and not tab page or dialogue page).
I have a button in the HomePage - ChanceCustomer, pressing which should take me to the newPage.view (control name changeCustomer).
Below are my codes
//Code for HomePage.controller.js
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
sap.ui.controller("view.HomePage", {
onInit: function(){
this.getView().addEventDelegate({
onAfterHide: function(evt) {
//This event is fired every time when the NavContainer has made this child control invisible.
},
onAfterShow: function(evt) {
//This event is fired every time when the NavContainer has made this child control visible.
},
onBeforeFirstShow: function(evt) {
//This event is fired before the NavContainer shows this child control for the first time.
},
onBeforeHide: function(evt) {
//This event is fired every time before the NavContainer hides this child control.
},
onBeforeShow: function(evt) {
//This event is fired every time before the NavContainer shows this child control.
}
});
},
onAfterRendering: function(evt){
},
homePage_onNavButtonTap: function() {
},
btn_onTap: function() {
var bus = sap.ui.getCore().getEventBus();
bus.publish("nav", "to", {
id : "appView--page"
});
},
OnChangeCustomerbtn: function(evt) {
var bus = sap.ui.getCore().getEventBus();
bus.publish("nav", "to", {
id : "changeCustomer"
});
},
});
////////////////////////////////////////////////////////////////////////////////////////////////////////
I have added the OnChangeCustomerbtn, but it still doesn't work when I try to run the app. I have previously looked at the MVC example , but is there any other way to make this button work?
Regards,
Ravi



