I made KENDOUI GRID work for READ with Spring ROO json as the backend.
However, for CREATE the generated response is HTTPSTATUS.CREATED.
KENDOUI GRID is expecting a HTTPSTATUS.OK with response body of "null".
I verified this by pushing-in the roo generated code and made the changes below. It worked.
JSON.aj Code
HttpHeaders headers = new HttpHeaders();
headers.add("Content-Type", "application/json");
return new ResponseEntity<String>(headers, HttpStatus.CREATED);
PUSHED-IN Code
HttpHeaders headers = new HttpHeaders();
headers.add("Content-Type", "application/json");
return new ResponseEntity<String>("null", headers, HttpStatus.OK);
Questions :
Is there a way to change the default response of roo's json aj files?
Or
Is there a way to handle other HTTPSTATUS in KENDOUI so a response of HttpStatus.CREATED would be treated as a success.
Lastly, KENODUI GRID seems not to be able to detect when the server encountered errors, since even Error 500 is not caught.