日期:2014-05-16  浏览次数:20639 次

Ext Form 提交的问题 - Web 开发 / Ajax
貌似最近Extjs挺火的样子,碰巧最近做的一个项目也是基于Extjs的,但是基本控件都封装好了,开发起来挺无脑的说,于是自己下下来捣鼓了一下,我用的框架是STRUTS2+EXTJS,页面FORM是用EXT的FORM,提交AJAX请求没什么问题,现在我想做的是提交表单,页面跳转,引用文档
A class which handles submission of data from Forms using a standard <form> element submit. It does not handle the response from the submit.

If validation of the form fields fails, the Form's afterAction method will be called. Otherwise, afterAction will not be called.

Instances of this class are only created by a Form when submitting, when the form's Ext.form.Basic.standardSubmit config option is true.

我已经把FORM的standardSubmit设true了,而报错结果竟然是EXT想要把我要跳转到的页面当成JSON解析出来,报的you're tring to decode an invalid JSON String,不是说不处理提交的结果吗?

------解决方案--------------------
JScript code

//配置项
oForm    = new Ext.FormPanel({
standardSubmit:true,
method:'POST',
onSubmit: Ext.emptyFn,
....
});
递交的时候
oForm.submit();