Package javax.faces.validator

Examples of javax.faces.validator.FacesValidator


    }

    @Override
    protected Validator resolveInstanceForClass(FacesContext facesContext, Class<?> wrappedClass)
    {
        FacesValidator facesValidator = wrappedClass.getAnnotation(FacesValidator.class);

        if (facesValidator == null)
        {
            return null;
        }

        return facesContext.getApplication().createValidator(facesValidator.value());
    }
View Full Code Here


        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

        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

        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

        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

        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

        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()
                                + ")");
                    }
                    String value = val.value();
                    if ( value == null ||
                        (value != null && value.length() <= 0))
                    {
                        String simpleName = clazz.getSimpleName();
                        value = Character.toLowerCase(simpleName.charAt(0)) + simpleName.substring(1);
                    }
                    facesConfig.addValidator(value, clazz.getName());
                    if (val.isDefault())
                    {
                        ApplicationImpl app = null;
                        if (facesConfig.getApplications().isEmpty())
                        {
                            app = new ApplicationImpl();
View Full Code Here

        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()
                                + ")");
                    }
                    String value = val.value();
                    if ( value == null ||
                        (value != null && value.length() <= 0))
                    {
                        String simpleName = clazz.getSimpleName();
                        value = Character.toLowerCase(simpleName.charAt(0)) + simpleName.substring(1);
                    }
                    facesConfig.addValidator(value, clazz.getName());
                    if (val.isDefault())
                    {
                        ApplicationImpl app = null;
                        if (facesConfig.getApplications().isEmpty())
                        {
                            app = new ApplicationImpl();
View Full Code Here

        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

        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()
                                + ")");
                    }
                    String value = val.value();
                    if ( value == null ||
                        (value != null && value.length() <= 0))
                    {
                        String simpleName = clazz.getSimpleName();
                        value = Character.toLowerCase(simpleName.charAt(0)) + simpleName.substring(1);
                    }
                    facesConfig.addValidator(value, clazz.getName());
                    if (val.isDefault())
                    {
                        ApplicationImpl app = null;
                        if (facesConfig.getApplications().isEmpty())
                        {
                            app = new ApplicationImpl();
View Full Code Here

TOP

Related Classes of javax.faces.validator.FacesValidator

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.