Win a copy of Spark in Action this week in the Open Source Projects forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Problem In Validator Interface

 
Ranch Hand
Posts: 183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 672
4
Eclipse IDE Spring Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
supports method tells you whether this validator supports the validations for the field in the specified class..
 
Abhra Kar
Ranch Hand
Posts: 183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
THanks
can you give me some links from where I will get complete ideas of spring validation

 
Prasad Krishnegowda
Ranch Hand
Posts: 672
4
Eclipse IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the help
I will go through it.
 
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic