开发者

JSF Generic Validator

开发者 https://www.devze.com 2023-03-20 04:57 出处:网络
I want to write a generic validatorfor checking name of a entity is exist or not.Currently i am doing this ,writing a new validator classforevery Entity object,How can i specify Class type of entity b

I want to write a generic validator for checking name of a entity is exist or not.Currently i am doing this ,writing a new validator class for every Entity object,How can i specify Class type of entity bean dynamicly and开发者_如何学Go write a generic validator for entity objects.

 public class LemfValidator implements Validator {
        public void validate(FacesContext context, UIComponent arg1,
                Object name) throws ValidatorException {


This is balusc post .It solve my problem.

http://balusc.blogspot.com/2007/12/validator-for-multiple-fields.html

0

精彩评论

暂无评论...
验证码 换一张
取 消