Package javax.faces.validator

Examples of javax.faces.validator.BeanValidator$FacesMessageInterpolator


                validator = context.getApplication().createValidator(validatorId);

                // special things to configure for a BeanValidator
                if (validator instanceof BeanValidator)
                {
                    BeanValidator beanValidator = (BeanValidator) validator;
                   
                    // check the validationGroups
                    String validationGroups =  beanValidator.getValidationGroups();
                    if (validationGroups == null
                            || validationGroups.matches(BeanValidator.EMPTY_VALIDATION_GROUPS_PATTERN))
                    {
                        // no validationGroups available
                        // --> get the validationGroups from the stack
                        //String stackGroup = mctx.getFirstValidationGroupFromStack();
                        //if (stackGroup != null)
                        //{
                        //    validationGroups = stackGroup;
                        //}
                        //else
                        //{
                            // no validationGroups on the stack
                            // --> set the default validationGroup
                            validationGroups = javax.validation.groups.Default.class.getName();
                        //}
                        beanValidator.setValidationGroups(validationGroups);
                    }
                }
               
                // add the validator to the component
                component.addValidator(validator);
View Full Code Here


       
        if (appMap.containsKey(BEANS_VALIDATION_AVAILABLE)) {
            result = (Boolean) appMap.get(BEANS_VALIDATION_AVAILABLE);
        } else {
            try {
                new BeanValidator();
                appMap.put(BEANS_VALIDATION_AVAILABLE, result = true);
            } catch (Throwable t) {
                appMap.put(BEANS_VALIDATION_AVAILABLE, Boolean.FALSE);
            }
        }
View Full Code Here

TOP

Related Classes of javax.faces.validator.BeanValidator$FacesMessageInterpolator

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.