Quantcast
Viewing all articles
Browse latest Browse all 8088

How to navigate from one view to another view?

Hi everyone facing a problem in navigation when i click on the list another view should be appear..

-------------------------------------------------------------------------------------------------------

page1.view.js:-


list1.onclick=function(evt){

  $.sap.require("sap.ui.core.EventBus");

  var bus=sap.ui.getCore().getEventBus();

  bus.publish("nav","to",{

  id:"idDemoUI2",                       //..id of page2...//

  context:evt.getSource().getBindingContext()

  });}

 

--------------------------------------------------------------------------------------------------------

page2.controller.js:-

 

onBeforeRendering: function(evt) {

  if (evt.data.context) {

         this.getView().setBindingContext(evt.data.context);

     } }

 

---------------------------------------------------------------------------------------------------------

i have a list i want when i click one the row of that list another view will appear so i use onclick event on the list and then use bus for navigation and recieving data in the target page but its not working anyone please tell me  where i am wrong.

 

 

 

Regards

Kelvin


Viewing all articles
Browse latest Browse all 8088

Trending Articles



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