View Full Version : Problem with FormPanel submit

21 Dec 2010, 1:27 AM
Ext version tested:

Ext 3.1.1

Adapter used:


css used:

only default ext-all.css

Browser versions tested against:

FF3 (3.6.13) + Firebug 1.6.0

Operating System:

Ubuntu Linux 32 bits


When the form submits, a response from the server is issued with content-type application/xml and form reader fails trying to process the result data as JSON (as the default behaviour). The form is defined with the reader property initialized to XmlReader. If i define the errorReader property as XmlReader, all works fine.

Test Case:

The same published in the web, but without the errorReader property:


Steps to reproduce the problem:

Explained in the test case.

The result that was expected:

No error.

The result that occurs instead:

From Firebug:

invalid regular expression flag r
chrome://firebug/content/blank.gif(<?xml version="1.0" encoding="UTF-8" ...uccess>true</success></respuestaForm>)

ext-all-debug.js (línea 4233)

Screenshot or Video:


Debugging already done:

Firebug headers:



Hostlocalhost:9003User-AgentMozilla/5.0 (X11; U; Linux i686; es-ES; rv: Gecko/20101206 Ubuntu/10.04 (lucid) Firefox/3.6.13Accepttext/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8Accept-Languagees,es-es;q=0.8,en;q=0.5,en-us;q=0.3Accept-Encodinggzip,deflateAccept-CharsetISO-8859-1,utf-8;q=0.7,*;q=0.7Keep-Alive115Connectionkeep-aliveX-Requested-WithXMLHttpRequestContent-Typeapplication/x-www-form-urlencoded; charset=UTF-8Refererhttp://localhost:9003/fotos/Content-Length32CookieJSESSIONID=ircbxvxhske
Possible fix:

Not provided

21 Dec 2010, 2:40 AM
That's the way it is supposed to work!

The form 'reader' is used for load() and the 'errorReader' is used for submit().

27 Dec 2010, 6:21 AM
That's the way it is supposed to work!

The form 'reader' is used for load() and the 'errorReader' is used for submit().

Oh!! Sorry. I see :(

Anyway, i think i get confused by the notation. Perhaps a better option could be something like "formLoadReader vs formSubmitReader" or "loadResultReader vs submitResultReader" ... errorReader seems to be related to some exception handling options and not to regular response from server.

Thanks for your help :)

27 Dec 2010, 6:33 AM
It's called errorReader, because on submit the server can send back errors for specific fields that will be marked invalid with those error messages.