title: How to dispatch from view to controller in Sencha Touch2 with Phonegap
body: <p>My View (MyFormPanel)</p>
  
  <pre><code>var controllers = Ext.define("MyApp.controller.formcontroller", {
      extend: "Ext.app.Controller",
      config: {
          refs: {
              username: "username"
  
   },
  },
  launch: function () {
       alert('Controller launched');
  
      },
      init: function () {
           alert('Controller init');
      },
  myaction : function (options) {
      alert('options');
        var username = options.username;
        this.render ({
          xtype: 'MyATM',
          username: username})}
  });
  var formPanel = Ext.create('Ext.form.Panel', {
      fullscreen: true,
      scrollable: 'vertical',
      layout: {
          align: 'center',
          type: 'vbox'
      },
      items: [
              {
                  xtype: 'toolbar',
                  docked: 'top',
                  title: 'Login Form'
              },
              {
          xtype: 'fieldset',
          items: [  
                  {  
                      xtype: 'fieldset',   
                      title:'Enter user name &amp; password',  
                      defaults: {  
                          required: true,  
                          labelAlign: 'left',  
                          labelWidth: '50%'  
                      },  
                      items: [  
                      {  
                          xtype: 'textfield',  
                          name : 'username',  
                          label: 'User Name', 
                          allowBlank:false,
                          useClearIcon: true  
                      }, {  
                          xtype: 'passwordfield',  
                          name : 'password',  
                          label: 'Password', 
                          allowBlank:false,
                          useClearIcon: false  
                      }, 
                      {
                          xtype: 'checkboxfield',
                          required:false,
                          id: 'RememberMe',
                          name: 'RememberMe',
                          label: 'Remember Me',
                          labelWidth: '50%'
                          },
                          {
                              xtype: 'button',
                              ui: 'confirm-round',
                              text: 'Log In' , 
                                  handler: function() {
                                      //Ext.Msg.alert('Form Values', JSON.stringify(formPanel.getValues(), null, 2));
  
                                      Ext.ControllerManager.get('formcontroller').ControllerMethod({myaction: myaction});
  
                                  }
                          }
  
                      ]  
                  }],  
      }]
  });
  
  formPanel.add({
      xtype: 'toolbar',
      docked: 'bottom',
      layout: { pack: 'center' },
  
  });
  </code></pre>
  
  <p>My controller (FormController)</p>
  
  <pre><code>    Ext.define("MyApp.controller.formcontroller", {
      extend: "Ext.app.Controller",
      config: {
          refs: {
              username: "username"
  
   },
  },
  launch: function () {
       alert('Controller launched');
  
      },
      init: function () {
           alert('Controller init');
      },
  myaction : function (options) {
      alert('options');
        var username = options.username;
        this.render ({
          xtype: 'MyATM',
          username: username})}
  });
  </code></pre>
  
  <p>I am using Sencha touch2 with Phonegap 1.4 on android 2.3. When i try to move view to controller on Login button click on handler function to invoke controller , i am getting error , Ext.dispatch is not defined as function . 
  Tell me the actual way how to move view to controller  and vice versa. 
  Thanks </p>