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 Problem In Validator Interface Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Problem In Validator Interface" Watch "Problem In Validator Interface" New topic
Author

Problem In Validator Interface

Abhra Kar
Ranch Hand

Joined: May 22, 2008
Posts: 124
What is the role of supports() in Validator.
I use a supports() like this ---

@Override
public boolean supports(Class<?> clazz) {
//return User.class.isAssignableFrom(clazz);
return User.class.equals(clazz);

//return false;
}

In this method body what does "isAssignableFrom(clazz);" do.

please provide me some links from where I can understand the Validator interface fully
Prasad Krishnegowda
Ranch Hand

Joined: Apr 25, 2010
Posts: 587
    
    3

supports method tells you whether this validator supports the validations for the field in the specified class..
Abhra Kar
Ranch Hand

Joined: May 22, 2008
Posts: 124
THanks
can you give me some links from where I will get complete ideas of spring validation

Prasad Krishnegowda
Ranch Hand

Joined: Apr 25, 2010
Posts: 587
    
    3

Spring official documentation is well written..
here it is http://static.springsource.org/spring/docs/3.0.x/reference/validation.html
Abhra Kar
Ranch Hand

Joined: May 22, 2008
Posts: 124
Thanks for the help
I will go through it.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem In Validator Interface