my dog learned polymorphism*
The moose likes Spring and the fly likes Spring 3 form validation 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 "Spring 3 form validation" Watch "Spring 3 form validation" New topic
Author

Spring 3 form validation

sachin pachpute
Ranch Hand

Joined: Aug 05, 2004
Posts: 35
Hi,

In my application I want to validate the field which contains reference to another domain object (Address in this case). I am able to validate name and age fields, but not able to validate fields from Address class (no message is displayed on jsp).


Bill Gorder
Bartender

Joined: Mar 07, 2010
Posts: 1648
    
    7

Show us what you have tried. What does your JSP.,controller, validation logic look like?


[How To Ask Questions][Read before you PM me]
sachin pachpute
Ranch Hand

Joined: Aug 05, 2004
Posts: 35
Details given below. Please note that validation is working fine for Article (only few fields I am validating for now), but isn't working for User which is referred from Article.

Article.java



User.java



ArticleController.java



relevant snippet from despatcher servlet (for JSR 303 & messages) is as below,



addArticle.jsp

sachin pachpute
Ranch Hand

Joined: Aug 05, 2004
Posts: 35
This problem is resolved for me now. Just read the document at http://docs.jboss.org/hibernate/validator/4.0.1/reference/en/html/validator-usingvalidator.html

I added,



before

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Spring 3 form validation
 
Similar Threads
generating JavaBean code
setter/getter in bean - overengineering?
Encapsulation in Java
writing a program
Object deserialiaztion .... with different versionUid