I'm trying to submit a form using the DirectSubmit API in extjs 4.2.
The error message is:
TypeError: me.form.api.submit is not a function [Break On This Error]
me.form.api.submit(formInfo.formEl, callback, me);
The exactly same code works in Extjs 4.1.1
I've noticed the code (directsubmit) has changed in 4.2
Is this a bug? Has someone had the same problem?
My code:
Ext.define('ExtMVC.view.MyForm', { extend: '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);
}
});
I have the @formhandler in the extdirect config.