Sencha Touch MVC ::试图到达Ext.extend(Ext.form.FormPanel,...)的getValues()

| 我试图在我的sencha touch应用程序中达到表单的价值,该应用程序是由教程的拼凑而成的。我希望它成为MVC模式应用程序,所以我使用
app.views.Login = Ext.extend(Ext.form.FormPanel, formBase = {...})
在里面用它初始化
 app.views.Login.superclass.initComponent.apply(this, arguments);
以及像sencha touch phonegap MVC教程(链接)中那样的视口,其中我将登录页面应用于
Ext.apply(app.views, {loginPage: new app.views.Login()});
在我的应用程序中,当我单击表单的发送按钮时,我尝试捕获表单的字段
handler: function() {
    console.log(\'username \', app.views.Login.getValues().username);
    Ext.Ajax.request({
        url: app.views.Login.url,
        method: \'POST\',
        params: {username: form.getValues().username, password : form.getValues().password},
        failure : function(response){
                    console.log(\'Login Error! \' + response.responseText);
                },
        success: function(response, opts) {
                    console.log(\'Login success! response: \' + response.responseText);
                  }
    });
}
但我总是得到一个错误,说   未捕获的TypeError:无法调用方法   \'getValues \'未定义\“ 当我使用
console.log(\'username \', this.getValues().username);
那我怎么能达到表格的价值呢? 谢谢!     
已邀请:
查看Sencha Touch API文档,我没有看到方法
getForm()
,但是应该可以通过按钮
handler
函数像这样访问
getValues()
app.views.loginPage.getValues();
    

要回复问题请先登录注册