-
16 Sep 2008 10:49 PM #1
ext-all-debug error by submitting a form
ext-all-debug error by submitting a form
Hi!
I want to submit a form by using the formPanels submit-method. The values will be send to the server and a JSP will process the data correctly. I've done this several times, but now i am getting an error. The JSP is executed correctly. This means that the JSPs result is what i want.
BUT then the error occurs:
In this line is: "Ext.decode = Ext.util.JSON.decode;"syntax error ............ ext-all-debug.js (line 6685)
)
My first working-form send the values to server and the response in firebug is:
"Loading...", the 'success'-config option in the submit-method is executed and the request is done.
But now i am getting no response.
Please help...
regards sdy
-
16 Sep 2008 10:53 PM #2
if it's helpful - my submit-method (it's working in my other forms):
Code:[...] buttons:[{ text: 'Save', handler: function (){ myForm.getForm().submit({ url: 'save.jsp', method:'POST', success: function(response, options) { alert("success");}, failure: function(response, options) { alert("failure");} }); }}] [...]
-
16 Sep 2008 10:56 PM #3Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 40
-
16 Sep 2008 11:07 PM #4
-
16 Sep 2008 11:14 PM #5Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 40
Yes, or you could change the errorReader, e.g.
Code:errorReader: { read: function(response) { return {success: true}; } }
-
16 Sep 2008 11:24 PM #6
hmm...i don't know where to put the error reader you described, but i read the API, copied the code
to my JSP, changed "success" to "true" and it works (i think, it doesn't matter whether i set success to true or false, the code is only needed to pretend the error)! is that correct? or have i to put something into my js-file?!Code:{ success: false, errors: { clientCode: "Client not found", portOfLoading: "This field must not be null" } }
-
16 Sep 2008 11:31 PM #7Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 40
Simply returning {success:true} is enough.
The errorReader is a config option of BasicForm (and also of FormPanel), so you should add it to the form config.
This errorReader config I posted overrides any data coming from the server (which in your case was empty) with {success: true}.
-
16 Sep 2008 11:35 PM #8


Reply With Quote