View Full Version : Java boolean success parameter received as string in JSON data on form.submit

24 Oct 2014, 5:23 AM

I am using ExtJs 4.2.2 and SA 3.1. On form.submit, i hit the rest layer written in java, where on successful validation, i set the boolean success variable as true and then that object is passed on the front-end. But in developer tools, i see the success is received as "true" and the neither callback functions (success / failure) are getting called.
This is what i receive in browser as response -
{"message":"A notification email has been sent to administrators.","success":"true","isContainer":"false"}
Even the isContainer is boolean but received as string.

How do i get around this issue?

Any help is appreciated.


25 Oct 2014, 12:58 AM
Your server should return

"success": true

instead of

"success": "true"

It should be a boolean true/false, not a string.

25 Oct 2014, 1:20 AM
Hi Slemmon, thanks for the reply. I am well aware of that. My issue is that i am passing the boolean success as true (bool value) from java backend but it is received as String. How do i get around this issue?

29 Oct 2014, 3:38 PM
Can you post the response from your server as seen in the browser dev tool's network tab?