Package javax.faces.convert

Examples of javax.faces.convert.FacesConverter


        classes = map.get(FacesConverter.class);
        if (classes != null && !classes.isEmpty())
        {
            for (Class<?> clazz : classes)
            {
                FacesConverter conv = (FacesConverter) clazz
                        .getAnnotation(FacesConverter.class);
                if (conv != null)
                {
                    if (log.isLoggable(Level.FINEST))
                    {
                        log.finest("addConverter(" + conv.value() + ","
                                + clazz.getName() + ")");
                    }
                    //If there is a previous entry on Application Configuration Resources,
                    //the entry there takes precedence
                    boolean hasForClass = !Object.class.equals(conv.forClass());
                    boolean hasValue = conv.value().length() > 0;
                    if (hasForClass || hasValue)
                    {
                        Converter converter = new Converter();
                        if (hasForClass)
                        {
                            converter.setForClass(conv.forClass().getName());
                        }
                        if (hasValue) {
                            converter.setConverterId(conv.value());
                        }
                        converter.setConverterClass(clazz.getName());
                        facesConfig.addConverter(converter);
                    }
                    else
View Full Code Here


        classes = map.get(FacesConverter.class);
        if (classes != null && !classes.isEmpty())
        {
            for (Class<?> clazz : classes)
            {
                FacesConverter conv = (FacesConverter) clazz
                        .getAnnotation(FacesConverter.class);
                if (conv != null)
                {
                    if (log.isLoggable(Level.FINEST))
                    {
                        log.finest("addConverter(" + conv.value() + ","
                                + clazz.getName() + ")");
                    }
                    //If there is a previous entry on Application Configuration Resources,
                    //the entry there takes precedence
                    boolean hasForClass = !Object.class.equals(conv.forClass());
                    boolean hasValue = conv.value().length() > 0;
                    if (hasForClass || hasValue)
                    {
                        Converter converter = new Converter();
                        if (hasForClass)
                        {
                            converter.setForClass(conv.forClass().getName());
                        }
                        if (hasValue)
                        {
                            converter.setConverterId(conv.value());
                        }
                        converter.setConverterClass(clazz.getName());
                        facesConfig.addConverter(converter);
                    }
                    else
View Full Code Here

        classes = map.get(FacesConverter.class);
        if (classes != null && !classes.isEmpty())
        {
            for (Class<?> clazz : classes)
            {
                FacesConverter conv = (FacesConverter) clazz
                        .getAnnotation(FacesConverter.class);
                if (conv != null)
                {
                    if (log.isLoggable(Level.FINEST))
                    {
                        log.finest("addConverter(" + conv.value() + ","
                                + clazz.getName() + ")");
                    }
                    //If there is a previous entry on Application Configuration Resources,
                    //the entry there takes precedence
                    boolean hasForClass = !Object.class.equals(conv.forClass());
                    boolean hasValue = conv.value().length() > 0;
                    if (hasForClass || hasValue)
                    {
                        Converter converter = new Converter();
                        if (hasForClass)
                        {
                            converter.setForClass(conv.forClass().getName());
                        }
                        if (hasValue)
                        {
                            converter.setConverterId(conv.value());
                        }
                        converter.setConverterClass(clazz.getName());
                        facesConfig.addConverter(converter);
                    }
                    else
View Full Code Here

        classes = map.get(FacesConverter.class);
        if (classes != null && !classes.isEmpty())
        {
            for (Class<?> clazz : classes)
            {
                FacesConverter conv = (FacesConverter) clazz
                        .getAnnotation(FacesConverter.class);
                if (conv != null)
                {
                    if (log.isLoggable(Level.FINEST))
                    {
                        log.finest("addConverter(" + conv.value() + ","
                                + clazz.getName() + ")");
                    }
                    //If there is a previous entry on Application Configuration Resources,
                    //the entry there takes precedence
                    if (!Object.class.equals(conv.forClass()))
                    {
                        Converter converter = new Converter();
                        converter.setForClass(conv.forClass().getName());
                        converter.setConverterClass(clazz.getName());
                        facesConfig.addConverter(converter);
                    }
                    else
                    {
                        Converter converter = new Converter();
                        converter.setConverterId(conv.value());
                        converter.setConverterClass(clazz.getName());
                        facesConfig.addConverter(converter);
                    }
                }               
            }
View Full Code Here

        classes = map.get(FacesConverter.class);
        if (classes != null && !classes.isEmpty())
        {
            for (Class<?> clazz : classes)
            {
                FacesConverter conv = (FacesConverter) clazz
                        .getAnnotation(FacesConverter.class);
                if (conv != null)
                {
                    if (log.isLoggable(Level.FINEST))
                    {
                        log.finest("addConverter(" + conv.value() + ","
                                + clazz.getName() + ")");
                    }
                    //If there is a previous entry on Application Configuration Resources,
                    //the entry there takes precedence
                    boolean hasForClass = !Object.class.equals(conv.forClass());
                    boolean hasValue = conv.value().length() > 0;
                    if (hasForClass || hasValue)
                    {
                        Converter converter = new Converter();
                        if (hasForClass)
                        {
                            converter.setForClass(conv.forClass().getName());
                        }
                        if (hasValue) {
                            converter.setConverterId(conv.value());
                        }
                        converter.setConverterClass(clazz.getName());
                        facesConfig.addConverter(converter);
                    }
                    else
View Full Code Here

        classes = map.get(FacesConverter.class);
        if (classes != null && !classes.isEmpty())
        {
            for (Class<?> clazz : classes)
            {
                FacesConverter conv = (FacesConverter) clazz
                        .getAnnotation(FacesConverter.class);
                if (conv != null)
                {
                    if (log.isLoggable(Level.FINEST))
                    {
                        log.finest("addConverter(" + conv.value() + ","
                                + clazz.getName() + ")");
                    }
                    //If there is a previous entry on Application Configuration Resources,
                    //the entry there takes precedence
                    boolean hasForClass = !Object.class.equals(conv.forClass());
                    boolean hasValue = conv.value().length() > 0;
                    if (hasForClass || hasValue)
                    {
                        Converter converter = new Converter();
                        if (hasForClass)
                        {
                            converter.setForClass(conv.forClass().getName());
                        }
                        if (hasValue)
                        {
                            converter.setConverterId(conv.value());
                        }
                        converter.setConverterClass(clazz.getName());
                        facesConfig.addConverter(converter);
                    }
                    else
View Full Code Here

        if (converters == null) {
            converters = new HashMap<Object,String>();
        }
        Object key = null;
        FacesConverter converterAnnotation = (FacesConverter) annotation;
        if (0 == converterAnnotation.value().length()) {
            key = converterAnnotation.forClass();
        } else {
            key = converterAnnotation.value();
        }
        converters.put(key, target.getName());

    }
View Full Code Here

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

        if (converters == null) {
            converters = new HashMap<Object,String>();
        }
        Object key = null;
        FacesConverter converterAnnotation = (FacesConverter) annotation;
        if (0 == converterAnnotation.value().length()) {
            key = converterAnnotation.forClass();
        } else {
            key = converterAnnotation.value();
        }
        converters.put(key, target.getName());

    }
View Full Code Here

        if (converters == null) {
            converters = new HashMap<Object,String>();
        }
        Object key;
        FacesConverter converterAnnotation = (FacesConverter) annotation;
       
        if (converterAnnotation.value().length() > 0 &&
                converterAnnotation.forClass() != null &&
                converterAnnotation.forClass() != Object.class) {
            if (LOGGER.isLoggable(Level.WARNING)) {
                LOGGER.log(Level.WARNING, "@FacesConverter is using both value and forClass, only value will be applied.");
            }
        }
       
        if (0 == converterAnnotation.value().length()) {
            key = converterAnnotation.forClass();
        } else {
            key = converterAnnotation.value();
        }
        converters.put(key, target.getName());

    }
View Full Code Here

TOP

Related Classes of javax.faces.convert.FacesConverter

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.