2013-04-01 36 views
0

我想在extjs 4.2中使用DirectSubmit API提交表單。Extjs 4.2 DirectSubmit不工作

的錯誤信息是:

類型錯誤:me.form.api.submit不是函數 [打破該誤差]

me.form.api.submit(formInfo.formEl,回調, 我);

完全相同的代碼在ExtJS的4.1.1工作

我注意到的代碼(directsubmit)在4.2

改變了這是一個錯誤?有人有同樣的問題嗎?

我的代碼:

Ext.define( 'ExtMVC.view.MyForm',{ 延伸: 'Ext.form.Panel',

height: 250, 
width: 400, 
bodyPadding: 10, 
title: 'My Form' 

initComponent: function() { 
    var me = this; 

    me.initialConfig = Ext.apply({ 
     api: { 
submit: 'Actions.Verbis_Processo.update'}, 
     standardSubmit: false 
    }, me.initialConfig); 

    Ext.applyIf(me, { 
     api: { 
submit: 'Actions.Verbis_Processo.update'}, 
     items: [ 
      { 
       xtype: 'textfield', 
       anchor: '100%', 
       fieldLabel: 'Label' 
      }, 
      { 
       xtype: 'button', 
       handler: function(button, event) { 
        button.up('form').getForm().submit(); 
       }, 
       text: 'MyButton' 
      } 
     ] 
    }); 

    me.callParent(arguments); 
} 

});

我在extdirect配置中有@formhandler。

回答

0

這是一個錯誤,它將在4.2.1中修復。