Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8623

Cannot read property 'call' of undefined

$
0
0

hi,

 

i am new to SAPUI5  .I am doing a basic mobile Application . I created two tiles and i want to do navigation between the two tiles but i got the following error


Cannot read property 'call' of undefined



here is my code in  view1.js

 

 

sap.ui.jsview("fioriappsdemo.view1", {

 

 

 

  getControllerName : function() {

  return "fioriappsdemo.view1";

  },

 

 

 

  createContent : function(oController) {

 

  var app = new sap.m.App('app1');

 

  app.placeAt('content');

 

 

  var oPage = new sap.m.Page({id: 'page1',title:'tiles app',enableScrolling: false});

  app.addPage(oPage);

 

  var oContainer = new sap.m.TileContainer('tile1');

 

  var t1 =  new sap.m.StandardTile('t1',{

 

  title: "sales Order App",

 

  press:[oController.forwardNav]

 

  });

 

  oContainer.addTile(t1);

 

  /*var T3 = new sap.m.StandardTile({title:"T3"});

  var oContainer = new sap.m.TileContainer("tilecontainer", {tiles:[T3]});

   */

 

  var t2 = new sap.m.StandardTile('t2',{

  title: " split App ",

 

  press: [oController.backwardNav]

  });

 

  oContainer.addTile(t2);

 

 

 

  oPage.addContent(oContainer);

 

  return this.page;

 

  }

 

 

});

 

 

 

 

in view1.controller.js

 

 

sap.ui.controller("fioriappsdemo.view1", {

 

 

 

  onInit: function() {

  function forwardNav   () {

 

  alert("1st tile to 2nd");

 

  sap.ui.getCore().byId('t2');

 

  app.to('t2');

 

  }

 

 

  function backwardNav() {

 

 

  alert (" 2nd tile to 1st");

 

  sap.ui.getCore.byId('t1');

 

  app.to('t1');

 

  }

  },

 

 

 

 

 

 

});

 

 

can any one help me to resolve this error

 

Thanks&Regards

Ramu Vedula


Viewing all articles
Browse latest Browse all 8623

Trending Articles



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