我正在尝试使用extjs 4.2中的DirectSubmit API提交表单。
错误信息是:
TypeError: me.form.api.submit不是一个函数[Break On This Error]
me.form.api.submit (formInfo。
完全相同的代码在Extjs 4.1.1
我注意到代码(directsubmit)在4.2
中发生了变化这是一个bug吗?有人遇到过同样的问题吗?
我代码: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
这是一个bug,将在4.2.1中修复。