ExtJS4直接表单提交
使用Ext.direct submit n load的常见表单,load工作正常,但submit返回错误,因为post数据中未定义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
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