Examples of FormatterFactory


Examples of ariba.ui.widgets.FormatterFactory

        }
    }

    public static FormatterFactory getFormatterFactoryForType (String type)
    {
        FormatterFactory factory = null;
        synchronized (_formatterFactories) {
            factory = (FormatterFactory)_formatterFactories.get(type);
        }
        return factory;
    }
View Full Code Here

Examples of ariba.ui.widgets.FormatterFactory

        formatters.put("currencyLong", BigDecimalMoneyFormatter.formattersByCurrencyWithSuffix());

        // Because of component dependency, we cannot reference the money formatter
        // directly.  Instead, it is registered dynamically.  If none has been register,
        // we fallback to old questionable formatting.
        FormatterFactory moneyFactory = getFormatterFactoryForType(MoneyFormatterKey);
        if (moneyFactory != null) {
            Object canonicalFmt = moneyFactory.getCanonicalFormatterForType(locale);
            Object objectFmt = moneyFactory.getObjectFormatterForType(locale);
            formatters.put(MoneyFormatterKey, objectFmt);
            xml.put(MoneyFormatterKey, new PipedFormatter(canonicalFmt, objectFmt));
        }
        else {
            // Object money = new AWVBigDecimalFormatter("$#,###.##", 2, locale);
View Full Code Here

Examples of net.sourceforge.stripes.format.FormatterFactory

  protected Formatter getFormatter(Object value) {
        Configuration configuration = StripesFilter.getConfiguration();
        if (configuration == null)
            return null;

        FormatterFactory factory = configuration.getFormatterFactory();
        if (factory == null)
            return null;

        return factory.getFormatter(value.getClass(), locale, null, null);
    }
View Full Code Here

Examples of net.sourceforge.stripes.format.FormatterFactory

    @SuppressWarnings("unchecked")
    protected String format(Object value) {
        if (value == null)
            return "";

        FormatterFactory factory = StripesFilter.getConfiguration().getFormatterFactory();
        Formatter formatter = factory.getFormatter(value.getClass(),
                                                   getPageContext().getRequest().getLocale(),
                                                   this.formatType,
                                                   this.formatPattern);
        if (formatter == null)
            return String.valueOf(value);
View Full Code Here

Examples of net.sourceforge.stripes.format.FormatterFactory

        if (input == null) {
            return "";
        }

        // format the value
        FormatterFactory factory = StripesFilter.getConfiguration().getFormatterFactory();
        Formatter formatter = factory.getFormatter(input.getClass(),
                                                   getPageContext().getRequest().getLocale(),
                                                   this.formatType,
                                                   this.formatPattern);
        String formatted = (formatter == null) ? String.valueOf(input) : formatter.format(input);
View Full Code Here

Examples of net.sourceforge.stripes.format.FormatterFactory

  protected Formatter getFormatter(Object value) {
        Configuration configuration = StripesFilter.getConfiguration();
        if (configuration == null)
            return null;

        FormatterFactory factory = configuration.getFormatterFactory();
        if (factory == null)
            return null;

        return factory.getFormatter(value.getClass(), locale, null, null);
    }
View Full Code Here

Examples of net.sourceforge.stripes.format.FormatterFactory

    protected Formatter getFormatter(Object value) {
        Configuration configuration = StripesFilter.getConfiguration();
        if (configuration == null)
            return null;

        FormatterFactory factory = configuration.getFormatterFactory();
        if (factory == null)
            return null;

        return factory.getFormatter(value.getClass(), locale, null, null);
    }
View Full Code Here

Examples of net.sourceforge.stripes.format.FormatterFactory

        if (input == null) {
            return "";
        }

        // format the value
        FormatterFactory factory = StripesFilter.getConfiguration().getFormatterFactory();
        Formatter formatter = factory.getFormatter(input.getClass(),
                                                   getPageContext().getRequest().getLocale(),
                                                   this.formatType,
                                                   this.formatPattern);
        String formatted = (formatter == null) ? String.valueOf(input) : formatter.format(input);
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.