File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Spring and the fly likes How to bind post data with my domain class? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "How to bind post data with my domain class?" Watch "How to bind post data with my domain class?" New topic
Author

How to bind post data with my domain class?

chaitanya karthikk
Ranch Hand

Joined: Sep 15, 2009
Posts: 806

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.


Love all, trust a few, do wrong to none.
chaitanya karthikk
Ranch Hand

Joined: Sep 15, 2009
Posts: 806

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to bind post data with my domain class?