- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Call event function from another method in Controller in SAP
It is advised not to call the event function from any other function but what you can do is refactor the event function implementation in a separate function and call that from any other function as shown below:
Example
BtnPress: function(oEvent) { // Separate the implementation in the helper function this.btnPressHelper(); } // Define the helper btnPressHelper: function() { //logic here } // call the helper from whichever function you want to get the desired output PerformSomething: function() { this.btnTapHelper(); }
- Related Articles
- Not able to call another function within initialize method of controller in SAP UI5.
- How to call a controller function inside a view in Laravel 5?
- How to call a JavaScript function from an onClick event?
- How to call a JavaScript function from an onsubmit event?
- How to call a JavaScript function from an onmouseover event?
- How to call a JavaScript function from an onmouseout event?
- How do I call a Variable from Another Function in Python?
- How to pass event objects from one function to another in JavaScript?
- Different connection types in SAP Remote Function call
- How to navigate from one view controller to another in iOS?
- How to call a function that returns another function in JavaScript?
- References are not allowed in a SAP remote function call
- How to call one constructor from another in Java?
- Making RFC call from COM/OLE object in SAP
- How to call a JavaScript function on a click event?

Advertisements