Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to bind post data with my domain class?

 
chaitanya karthikk
Ranch Hand
Posts: 806
Java MySQL Database Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all, I am sending some post data to a controller and I want it to be populated to my form backing object and validate it. Without ajax when I send a http request the form backing object is automatically populated and when I put @Valid it is validated and errors are returned. But when I try to make the same with ajax my form backing object is not populated automatically.

How to do this? Can anyone please tell me. Right now I am using @RequestParam to get the parameters and validating without annotations.

Any help is greatly appreciated. Thank you, good day.
 
chaitanya karthikk
Ranch Hand
Posts: 806
Java MySQL Database Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry guys, there was some problem in my form and it was sending a 400 Bad request and due to that automatic binding and validation could not be done. Later when I saw my browser console I realized the problem.

Thank you.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic