aspose 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


Win a copy of Spring in Action this week in the Spring forum!
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: 122
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: 537

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: 122
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: 537

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