Quantcast
Channel: SCN: Message List - SAPUI5 Developer Center
Viewing all articles
Browse latest Browse all 8124

Re: Navigation between views in SAPUI5

$
0
0

Hi  Rauf,

 

I am not able to navigate the two XML views

My index.html is

 

 

  <script>  sap.ui.localResources("ghmanagesystem");  //var app = new sap.m.App({initialPage:"idGHFirst1"});  var page2 = sap.ui.view({id:"idGHLoginForm1", viewName:"ghmanagesystem.GHLoginForm", type:sap.ui.core.mvc.ViewType.XML});  var page = sap.ui.view({id:"idGHFirst1", viewName:"ghmanagesystem.GHFirst", type:sap.ui.core.mvc.ViewType.XML});  var app = new sap.m.App("id1",{pages:[page2], initialPage:"idGHFirst1"});  app.addPage(page);  app.addPage(page2);  app.placeAt("content");  </script>

GHFirst,controller.xml

 

onButtonClick : function(){  alert("onButtonClick");  var bus = sap.ui.getCore().getEventBus();  bus.publish("nav", "to", {  id : "GHLoginForm",  data :{  key : "HI"  }  });  }

GHLoginForm.controller.xml

 

onInit: function() {  this.getView().addEventDelegate({  onBeforeShow : jQuery.proxy(function(oEvt) {  this.onBeforeShow(oEvt);  }, this)  });  },  onBeforeShow : function(oEvent){  var data = oEvent.data.key;  },

I have written this controllers and index file. Please review this code..

 

Regards,

Prashant


Viewing all articles
Browse latest Browse all 8124

Trending Articles



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