This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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: 800

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: 800

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.
 
wood burning stoves
 
subject: How to bind post data with my domain class?
 
Similar Threads
move data on (xhtml)form to another (xhtml)form in jsf
jsf 1.2 Facelets - Double clicks on a selectManyListbox
send json object to jsf backing bean
Prevent data in h:inputTextArea from being submitted
Problem in submitting values to be mapped to backing bean