title: ExtJS 5: Using lookupReference in ViewController beforeInit
body: <p>I'm trying to look up a reference to one of my components in the ViewController's <code>beforeInit</code>, so I can set some variables on <code>myComponent</code> before it's created, but <code>lookupReference</code> does not find my component in the beforeInit call... it's found in the ViewController's init method, but I'm assuming because the view hasn't actually been rendered, the reference hasn't been created.</p>
  
  <p>So I figured I'd try <code>initComponent</code>, but once again, the lookupReference doesn't work in there... I know I could create an itemId and look for this in initComponent, but that's last resort for me... I'd rather use the reference. See <a href="https://fiddle.sencha.com/#fiddle/nvs" rel="nofollow">this Fiddle</a> example and code:</p>
  
  <pre><code>Ext.application({
    name: 'Fiddle',
  
    launch: function() {
      Ext.define('MyViewController', {
        extend: 'Ext.app.ViewController',
        alias: 'controller.myview',
  
        beforeInit: function() {
          console.log('beforeInit: I want this to exist before myComponent is rendered', this.lookupReference('myComponent'));
        },
  
        init: function() {
          console.log('init', this.lookupReference('myComponent'));
        }
      });
      Ext.define('MyView', {
        extend: 'Ext.panel.Panel',
        controller: 'myview',
        title: 'My View',
        height: 400,
        width: 400,
        items: [{
          xtype: 'textfield',
          reference: 'myComponent',
          fieldLabel: 'My Component'
        }],
        initComponent: function() {
          // I want this to happen before myComponent is rendered
          console.log('initComponent: I want this to exist before myComponent is rendered', this.lookupReference('myComponent'));
          this.callParent();
          console.log('initComponent callParent', this.lookupReference('myComponent'));
        }
      });
      Ext.create('MyView', {
        renderTo: Ext.getBody()
      });
    }
  });
  </code></pre>
  
  <p>Does anyone have any guidance on how to accomplish something like this?</p>