PDA

View Full Version : Form submit with JsonWriter



divad
22 Feb 2011, 1:44 AM
How can I use form submit like error handling using a JsonWriter.

Using Form submit when the server returns something like:

{
"errors": {
"cli": "Error in this field"
},
"success": false
}

The Form highlights the "cli" field.

I am using a JsonWriter instead so my submit action is:

onSubmit : function() {
this.formpanel.getForm().updateRecord(this.record);
}

How can I use the "errors" in the server response using this?