Package net.sourceforge.stripes.format

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


    @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

        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

  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

    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

        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

Related Classes of net.sourceforge.stripes.format.FormatterFactory

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.