-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Using metadata API
PostPosted: Wed Nov 04, 2009 2:01 pm 
Newbie

Joined: Wed Nov 04, 2009 1:19 pm
Posts: 2
Hi,

is there any tuturial on using metadata API on Hibernate Validator 4.0 please ? My goal is to read property constraints on given bean (from my custom jsp tags) and add those constraints to input fields (for example set maxlength attribute on text input field) - also some caching of already read data is needed. I think about creating bean metadata cache on application start (using spring framework) and then store read data there - that would be not difficult I think, but I already have configured Validator instance (using spring) and it must somehow read those metadata too, so my question is: can I use Validator instance or any helper class working with Validator instance to read those metadata instead of creating custom bean metadata cache?

Thank you for any help.
Best regards, Pavla Novakova


Top
 Profile  
 
 Post subject: Re: Using metadata API
PostPosted: Thu Nov 05, 2009 6:38 am 
Newbie

Joined: Wed Nov 04, 2009 1:19 pm
Posts: 2
I've found simple answer to my question - using getConstraintsForClass method of Validator. Hope this helps someone else.

Pavla.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.