| Author |
Problem In Validator Interface
|
Abhra Kar
Ranch Hand
Joined: May 22, 2008
Posts: 112
|
|
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: 503
|
|
|
supports method tells you whether this validator supports the validations for the field in the specified class..
|
Regards, Prasad
SCJP 5 (93%)
|
 |
Abhra Kar
Ranch Hand
Joined: May 22, 2008
Posts: 112
|
|
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: 503
|
|
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: 112
|
|
Thanks for the help
I will go through it.
|
 |
 |
|
|
subject: Problem In Validator Interface
|
|
|