title: Extjs get Model by Controller
body: <p>I get controller bind to model, and model with proxy on it. I try to get model in controller init function. I use next code:</p>
  
  <pre><code>Ext.define("AM.controller.Main", {
      extend: 'Ext.app.Controller',
  
      views: [
              'Grid'
          ],
    models:[          
            'AM.model.Points'
            ],
      init: function(){
      var m = this.getModel('AM.model.Points');
      m.getCount();
  }
  </code></pre>
  
  <p>But the getCount is not defined. When I print variable m it says it is function: constructor() :</p>
  
  <pre><code>function constructor() {
  
  
              return this.constructor.apply(this, arguments) || null;
          } 
  </code></pre>
  
  <p>What should I do to get right model object of controller?</p>
  
  <p>Here I add my store, my model with proxy on it:</p>
  
  <pre><code>Ext.define('AM.store.ServerStore', {
          extend: 'Ext.data.Store',   
          model: 'AM.model.Points'
       });
  
  Ext.define('AM.model.Points', {
          extend: 'Ext.data.Model',
          idProperty: {
                name: 'UUID', 
                type: String,
                isUnique: true
              },  
          fields: [ 
                    {
                      name: 'NO',
                      type: "string"
                    },
                    {
                      name: 'Y',
                      type: "int"
                    },
                    {
                      name: 'ROW',
                      type: 'int'
                    },
                    {
                      name: 'SEAT',
                      type: 'string'
                    },
  
                    {
                      name: 'PROCEEDED',
                      type: 'int'
                    },
                    {
                      name: 'X',
                      type: "int"
                    },
                    {
                      name: "CurrentPlace",
                      type: "int",  
                      defaultValue: 0  
                    }
                    ],
  
                    proxy: {
                        type: 'ajax',            
                        url: 'http://localhost:81/is-bin/INTERSHOP.enfinity/WFS/EnterpriseOrg-MainChannel-Site/ru_RU/-/RUR/HallScheme-PrepareHSXML?HallSchemeElementUUID=zm1VFZxy014AAAENz2ZCr4MF',
                        method: 'POST',
                        headers: {'Content-Type': 'application/x-www-form-urlencoded'},
                        params: {
                              "HallSchemeElementUUID" : "zm1VFZxy014AAAENz2ZCr4MF"
                          },                      
                          remoteSort: true,
                        reader: {
                            type: 'xml',
                            record: 'PLACE'
                        }, 
  
                      writer: {
                          type: 'xml',                  
                          root: 'PLACE'
                      }
                  }
  
      });
  </code></pre>