title: Retrieve a model from another view when calling as component
body: <p>I'm currently trying to call a component from another application, I have created a button in my app and when they click the button it loads the popover how I want it to. But now they want their own button which will open the popover. So what I thought would work is at the start of my controller add this:</p>
  
  <pre><code>_view: null,
  </code></pre>
  
  <p>then onInit add this.</p>
  
  <pre><code>this._view = this.getView();
  </code></pre>
  
  <p>Then later on when I want to reference this view I thought I could just use this_view and it would work. It still works fine with these changes for my button, but for there button it is setting this._view back to null.</p>
  
  <p>So what I'm actually trying to do is get a model from the view like this:</p>
  
  <pre><code>this._view.getModel("modelName");
  </code></pre>
  
  <p>but it throws an Uncaught TypeError: Cannot read property 'getModel' of null. As this._view is null. Is there anyway to make the view global for when another application calls the component. Or is there a way to use like sap.ui.getCore. I have tried looking in to this but I keep coming up a blank. </p>
  
  <p>Again when they use the button I created it works, I assume as this is part of the apps view, so this is only an issue when they call it from there applications button. </p>
  
  <p>TIA</p>