Examples of FacesValidator


Examples of javax.faces.validator.FacesValidator

        classes = map.get(FacesValidator.class);
        if (classes != null && !classes.isEmpty())
        {
            for (Class<?> clazz : classes)
            {
                FacesValidator val = (FacesValidator) clazz
                        .getAnnotation(FacesValidator.class);
                if (val != null)
                {
                    if (log.isLoggable(Level.FINEST))
                    {
                        log.finest("addValidator(" + val.value() + "," + clazz.getName()
                                + ")");
                    }
                    facesConfig.addValidator(val.value(), clazz.getName());
                    if (val.isDefault())
                    {
                        Application app = null;
                        if (facesConfig.getApplications().isEmpty())
                        {
                            app = new Application();
                        }
                        else
                        {
                            app = (Application) facesConfig.getApplications().get(0);
                        }
                        app.addDefaultValidatorId(val.value());
                    }
                }
            }
        }
View Full Code Here

Examples of javax.faces.validator.FacesValidator

        classes = map.get(FacesValidator.class);
        if (classes != null && !classes.isEmpty())
        {
            for (Class<?> clazz : classes)
            {
                FacesValidator val = (FacesValidator) clazz
                .getAnnotation(FacesValidator.class);
                if (val != null)
                {
                    if (log.isLoggable(Level.FINEST))
                    {
                        log.finest("addValidator(" + val.value() + "," + clazz.getName()
                                + ")");
                    }
                    facesConfig.addValidator(val.value(), clazz.getName());
                }
            }
        }

        classes = map.get(FacesRenderer.class);
View Full Code Here

Examples of javax.faces.validator.FacesValidator

        classes = map.get(FacesValidator.class);
        if (classes != null && !classes.isEmpty())
        {
            for (Class<?> clazz : classes)
            {
                FacesValidator val = (FacesValidator) clazz
                .getAnnotation(FacesValidator.class);
                if (val != null)
                {
                    if (log.isLoggable(Level.FINEST))
                    {
                        log.finest("addValidator(" + val.value() + "," + clazz.getName()
                                + ")");
                    }
                    facesConfig.addValidator(val.value(), clazz.getName());
                    if (val.isDefault())
                    {
                        Application app = null;
                        if(facesConfig.getApplications().isEmpty())
                        {
                            app = new Application();
                        }
                        else
                        {
                            app = (Application) facesConfig.getApplications().get(0);
                        }
                        app.addDefaultValidatorId(val.value());
                    }
                }
            }
        }
View Full Code Here

Examples of javax.faces.validator.FacesValidator

        classes = map.get(FacesValidator.class);
        if (classes != null && !classes.isEmpty())
        {
            for (Class<?> clazz : classes)
            {
                FacesValidator val = (FacesValidator) clazz
                        .getAnnotation(FacesValidator.class);
                if (val != null)
                {
                    if (log.isLoggable(Level.FINEST))
                    {
                        log.finest("addValidator(" + val.value() + "," + clazz.getName()
                                + ")");
                    }
                    facesConfig.addValidator(val.value(), clazz.getName());
                    if (val.isDefault())
                    {
                        Application app = null;
                        if (facesConfig.getApplications().isEmpty())
                        {
                            app = new Application();
                        }
                        else
                        {
                            app = (Application) facesConfig.getApplications().get(0);
                        }
                        app.addDefaultValidatorId(val.value());
                    }
                }
            }
        }
View Full Code Here

Examples of javax.faces.validator.FacesValidator

    public void collect(Class<?> target, Annotation annotation) {

        if (validators == null) {
            validators = new HashMap<ValidatorInfo,String>();
        }
        FacesValidator validatorAnnotation = (FacesValidator) annotation;
        ValidatorInfo info = new ValidatorInfo(validatorAnnotation.value(), validatorAnnotation.isDefault());
        validators.put(info, target.getName());

    }
View Full Code Here

Examples of javax.faces.validator.FacesValidator

        classes = map.get(FacesValidator.class);
        if (classes != null && !classes.isEmpty())
        {
            for (Class<?> clazz : classes)
            {
                FacesValidator val = (FacesValidator) clazz
                .getAnnotation(FacesValidator.class);
                if (val != null)
                {
                    if (log.isLoggable(Level.FINEST))
                    {
                        log.finest("addValidator(" + val.value() + "," + clazz.getName()
                                + ")");
                    }
                    //If there is a previous entry on Application Configuration Resources,
                    //the entry there takes precedence
                    if (dispenser.getValidatorClass(val.value()) == null)
                    {
                        application.addValidator(val.value(), clazz.getName());
                        if (val.isDefault())
                        {
                            application.addDefaultValidatorId(val.value());
                        }
                    }
                }
            }
        }
View Full Code Here

Examples of javax.faces.validator.FacesValidator

    public void collect(Class<?> target, Annotation annotation) {

        if (validators == null) {
            validators = new HashMap<ValidatorInfo,String>();
        }
        FacesValidator validatorAnnotation = (FacesValidator) annotation;
        ValidatorInfo info = new ValidatorInfo(validatorAnnotation.value(), validatorAnnotation.isDefault());
        validators.put(info, target.getName());

    }
View Full Code Here

Examples of javax.faces.validator.FacesValidator

    public void collect(Class<?> target, Annotation annotation) {

        if (validators == null) {
            validators = new HashMap<ValidatorInfo,String>();
        }
        FacesValidator validatorAnnotation = (FacesValidator) annotation;
        String value = ((FacesValidator) annotation).value();
        if (null == value || 0 == value.length()) {
            value = target.getSimpleName();
            value = Character.toLowerCase(value.charAt(0)) + value.substring(1);
        }
        ValidatorInfo info = new ValidatorInfo(value, validatorAnnotation.isDefault());
        validators.put(info, target.getName());

    }
View Full Code Here

Examples of javax.faces.validator.FacesValidator

    public void collect(Class<?> target, Annotation annotation) {

        if (validators == null) {
            validators = new HashMap<ValidatorInfo,String>();
        }
        FacesValidator validatorAnnotation = (FacesValidator) annotation;
        ValidatorInfo info = new ValidatorInfo(validatorAnnotation.value(), validatorAnnotation.isDefault());
        validators.put(info, target.getName());

    }
View Full Code Here

Examples of javax.faces.validator.FacesValidator

            {
                application.addConverter(conv.value(), clazz.getName());
            }
        }
       
        FacesValidator val = (FacesValidator) clazz
        .getAnnotation(FacesValidator.class);
        if (val != null)
        {
            if (log.isLoggable(Level.FINEST))
            {
                log.finest("addValidator(" + val.value() + "," + clazz.getName()
                        + ")");
            }
            //If there is a previous entry on Application Configuration Resources,
            //the entry there takes precedence
            if (dispenser.getValidatorClass(val.value()) == null)
            {
                application.addValidator(val.value(), clazz.getName());
                if (val.isDefault())
                {
                    application.addDefaultValidatorId(val.value());
                }
            }
        }

        FacesRenderer rend = (FacesRenderer) clazz
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.