Package javax.faces.convert

Examples of javax.faces.convert.FacesConverter


        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, "A @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


            {
                application.addComponent(comp.value(), clazz.getName());               
            }
        }
       
        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());
            }
        }
       
        FacesValidator val = (FacesValidator) clazz
        .getAnnotation(FacesValidator.class);
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.