Package org.richfaces.validator

Examples of org.richfaces.validator.FacesValidatorService


            Validator[] facesValidators = input.getValidators();
            FacesContext facesContext = context.getFacesContext();
            if (facesValidators.length > 0) {
                String validatorMessage = (String) component.getAttributes().get("validatorMessage");
                boolean beanValidatorsProcessed = false;
                FacesValidatorService facesValidatorService = ServiceTracker.getService(facesContext,
                        FacesValidatorService.class);
                for (Validator validator : facesValidators) {
                    if (validator instanceof BeanValidator || validator instanceof FacesBeanValidator) {
                        ValueExpression valueExpression = component.getValueExpression(VALUE);
                        if (null != valueExpression && !beanValidatorsProcessed) {
                            BeanValidatorService beanValidatorService = ServiceTracker.getService(facesContext,
                                    BeanValidatorService.class);
                            validators.addAll(beanValidatorService.getConstrains(facesContext, valueExpression,
                                    validatorMessage, getGroups()));
                            beanValidatorsProcessed = true;
                        }
                    } else {
                        validators.add(facesValidatorService.getValidatorDescription(facesContext, input, validator,
                                validatorMessage));
                    }
                }
            }
            return validators;
View Full Code Here


            Validator[] facesValidators = input.getValidators();
            FacesContext facesContext = context.getFacesContext();
            if (facesValidators.length > 0) {
                String validatorMessage = (String) component.getAttributes().get("validatorMessage");
                boolean beanValidatorsProcessed = false;
                FacesValidatorService facesValidatorService = ServiceTracker.getService(facesContext,
                        FacesValidatorService.class);
                for (Validator validator : facesValidators) {
                    if (validator instanceof BeanValidator || validator instanceof FacesBeanValidator) {
                        ValueExpression valueExpression = component.getValueExpression(VALUE);
                        if (null != valueExpression && !beanValidatorsProcessed) {
                            BeanValidatorService beanValidatorService = ServiceTracker.getService(facesContext,
                                    BeanValidatorService.class);
                            validators.addAll(beanValidatorService.getConstrains(facesContext, valueExpression,
                                    validatorMessage, getGroups()));
                            beanValidatorsProcessed = true;
                        }
                    } else {
                        validators.add(facesValidatorService.getValidatorDescription(facesContext, input, validator,
                                validatorMessage));
                    }
                }
            }
            return validators;
View Full Code Here

TOP

Related Classes of org.richfaces.validator.FacesValidatorService

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.