sjivan / gwt-ext

Automatically exported from code.google.com/p/gwt-ext
0 stars 0 forks source link

Form . ErrorReader doesn't work with Form . FileUpload set to true #308

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. FormPanel fp = new FormPanel();
2. fp.setFileUpload(true);
3. fp.setErrorReader(errorReader);
4. fp.getForm().submit(urlSubmit, null, Connection.POST, "Uploading
file...", false);
5. Server side, the servlet responding at urlSubmit return :
{"errors":[{"msg":"Error in file","id":"theInputFileUpload"}],"success":false}

What is the expected output? What do you see instead?
 I expect :
Error "Error in file" on field "theInputFileUpload"
 Globaly, my result :
Waiting mask don't stop and continue locking form without errors.

What version of the product are you using? On what operating system?
gwtext-2.0.3
ext-2.0.2
gwt-linux-1.4.61

Please provide any additional information below.
Depending on the cases and browsers :

1/ Servlet return no header and no content
 IE : Waiting mask running loop
 FIREFOX : Waiting mask load and stop but no field error
 GWT BROWSER : Waiting mask running loop

2/ Servlet return no header but content : {"errors":[{"msg":"Error in
file","id":"theInputFileUpload"}],"success":false}
 IE : Waiting mask running loop
 FIREFOX : Waiting mask load and stop but no field error
 GWT BROWSER : Waiting mask running loop

3/ Servlet return header (application/json) and content :
{"errors":[{"msg":"Error in file","id":"theInputFileUpload"}],"success":false}
 IE : Waiting mask running loop
 FIREFOX : Ask to browser to download a file containing the content
returned by the servlet and waiting mask running loop
 GWT BROWSER : Ask to browser to download a file containing the content
returned by the servlet and waiting mask running loop

Original issue reported on code.google.com by sjac...@gmail.com on 10 Apr 2008 at 11:00

GoogleCodeExporter commented 8 years ago
you should set content type to "text/html" when sending a JSON response from 
your
servlet to GWT-Ext upload form; see
http://extjs.com/forum/showthread.php?t=8129&highlight=response+uploads

Original comment by jmoc...@gmail.com on 16 May 2008 at 2:57