title: SAPUI5: How to call a function from another function in the same controller
body: <p>I can't call a function from another function of the same controller.
  What I have in my controller:</p>
  
  <pre><code>checkData: function(){
      if(//check the data here before submitting it to the server){
          //display error message if the data is not ok
      }
      else{
          //call the function that submits data - submitData
      }
  },
  
  submitData: function(){
      //make ajax call here
  }
  </code></pre>
  
  <p>How do I call submitData function from within <code>else</code> block of checkData function?</p>
  
  <h2>EDIT:</h2>
  
  <p>Here is the complete code of 2 above mentioned functions:
  <a href="http://jsbin.com/jigurahuliha/1/edit?js" rel="nofollow">Link to JSBin</a></p>