Package org.apache.shale.validator.converter

Examples of org.apache.shale.validator.converter.IntegerConverter


     * registered on our corresponding <code>UIComponent</code>.</p>
     */
    protected Converter createConverter() {

        FacesContext context = FacesContext.getCurrentInstance();
        IntegerConverter converter = new IntegerConverter();

        if (locale != null) {
            Locale value = null;
            if (UIComponentTag.isValueReference(locale)) {
                ValueBinding vb = context.getApplication().createValueBinding(locale);
                value = (Locale) vb.getValue(context);
            } else {
                value = (Locale) HELPER.asObject(context, Locale.class, locale);
            }
            converter.setLocale(value);
        }

        if (pattern != null) {
            String value = null;
            if (UIComponentTag.isValueReference(message)) {
                ValueBinding vb = context.getApplication().createValueBinding(pattern);
                value = (String) vb.getValue(context);
            } else {
                value = pattern;
            }
            converter.setPattern(value);
        }

        return converter;

    }
View Full Code Here

TOP

Related Classes of org.apache.shale.validator.converter.IntegerConverter

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.