title: How to call a function in Init method?
body: <p>I'm new to sapui5, and I'd like to know how to call a function in my Init method?</p>
  
  <p>The code I have currently is below:</p>
  
  <pre><code>onInit: function() { 
  
          this.oInitialLoadFinishedDeferred = jQuery.Deferred();          
          var oEventBus = this.getEventBus();
  
  
  
          this.getView().byId("list").attachEventOnce("updateFinished", function() {
              this.oInitialLoadFinishedDeferred.resolve();
              oEventBus.publish("Master", "InitialLoadFinished", {
                  oListItem: this.getView().byId("list").getItems()[0]
              });
          }, this);
  
          oEventBus.subscribe("Detail", "TabChanged", this.onDetailTabChanged, this);
  
          //on phones, we will not have to select anything in the list so we don't need to attach to events
          if (Device.system.phone) {
              return;
          }
  
  
          this.getRouter().attachRoutePatternMatched(this.onRouteMatched, this);
  
          oEventBus.subscribe("Detail", "Changed", this.onDetailChanged, this);
          oEventBus.subscribe("Detail", "NotFound", this.onNotFound, this);
          oEventBus.subscribe("Detail", "Cancelled", this.onDetailChangeCancelled, this);
  
          // this.handleSelectDialogPress();
  
      }   
  </code></pre>
  
  <p>Any suggestions?</p>