using the DataForm object I found that its posting values correctly to server. Here is the screenshot
but on server I am getting null for these object. Here is my server side code
@RequestMapping(method = POST, value = "/create", produces = "application/json")
@ResponseBody
public UIResponse createDS(@Validated @ModelAttribute(value = "dS") DSDto dSDto,
BindingResult result) {
//here dSDto.name and dSDto.description is null
}
you have to add the @RequestBody annotation so Spring would convert the incoming JSON to a object from the post body .take a look at this stack overflow post @RequestBody and @ResponseBody annotations in Spring