Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 8150

How to call a function in a controller from different function which is in same controller

$
0
0

Hi,

  In a controller , I have two function 'A' and 'B' , how can we call function 'B' from function 'A'. The normal JS approach is not working for me.

 

 

  Sample code:

 

 

sap.ui.controller("trailbindingtile.myexample", {

 

  A: function(oEvent){

alert("in A");

B();  //  this is  not invoking function B. I also tried "sap.ui.getCore().getControl("tileexample").myexample().B()"

  },

 

 

B: function(){

alert ("in B");

}

});

 

 

Kindly let me know the actual way of implementing this?

 

Regards

Buddha Puneeth N.


Viewing all articles
Browse latest Browse all 8150

Trending Articles