Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/arduino/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
ExtJS4直接表单提交_Extjs4 - Fatal编程技术网

ExtJS4直接表单提交

ExtJS4直接表单提交,extjs4,Extjs4,使用Ext.direct submit n load的常见表单,load工作正常,但submit返回错误,因为post数据中未定义 var _form = Ext.create('Ext.form.Panel', { api: { submit: submit, //actions I took from code that going above, and never mind what I ll write here. Its not a problem load: loa

使用Ext.direct submit n load的常见表单,load工作正常,但submit返回错误,因为post数据中未定义



var _form = Ext.create('Ext.form.Panel', {
 api: {
   submit: submit, //actions I took from code that going above, and never mind what I ll write here. Its not a problem
   load: load           
    },
    baseParams: {
        st_id: st_id,
        id: id
    },
    paramsAsHash: true,
    defaultType: 'textfield',
    buttons: [{
        text: 'Cancel',
        handler: function() {
            this.up('form').getForm().reset();
        }
    }, {
        text: 'Save',
        handler: function() {
            var values = this.up('form').getForm().getValues();
            this.up('form').getForm().submit({
                success: function() {
                    grid.getStore().load();
                }
            });
            this.up('form').getForm().reset();
        }
    }]
});

在to headers中写道,内容类型是“application/json”;但在其他情况下,它的“application/x-www-form-urlencoded”,最后才有意义,对吗?它是有效的,但以其他形式。
所有这些都是在Kohana下进行的,所以当我清楚地看到控制器中发生了什么时,在Extdirect路由器中,我看到这个表单中没有关于提交方法的信息。

这是一个愚蠢的错误:我忘记了定义中的@formHandler