diff options
author | Artur Signell <artur@vaadin.com> | 2011-12-12 14:51:22 +0200 |
---|---|---|
committer | Artur Signell <artur@vaadin.com> | 2011-12-12 15:00:50 +0200 |
commit | 582e3e697aedceacba7f8d83e8c7b0c4e812c8ef (patch) | |
tree | 19a3d706c65e8e3572f6cbb96354fc116f25f03e /src/com/vaadin/Application.java | |
parent | 3da1452bf2e27f7305db05c10b183882e009a733 (diff) | |
download | vaadin-framework-582e3e697aedceacba7f8d83e8c7b0c4e812c8ef.tar.gz vaadin-framework-582e3e697aedceacba7f8d83e8c7b0c4e812c8ef.zip |
#8103 ConverterFactory is no longer static + javadoc updates
Diffstat (limited to 'src/com/vaadin/Application.java')
-rw-r--r-- | src/com/vaadin/Application.java | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/src/com/vaadin/Application.java b/src/com/vaadin/Application.java index 7bbb12032d..cd41a1165a 100644 --- a/src/com/vaadin/Application.java +++ b/src/com/vaadin/Application.java @@ -517,11 +517,10 @@ public class Application implements Terminal.ErrorListener, Serializable { private Terminal.ErrorListener errorHandler = this; /** - * The converter factory that is used for all fields in the application. + * The converter factory that is used to provide default converters for the + * application. */ - // private ConverterFactory converterFactory = new - // DefaultConverterFactory(); - private static ConverterFactory converterFactory = new DefaultConverterFactory(); + private ConverterFactory converterFactory = new DefaultConverterFactory(); private LinkedList<RequestHandler> requestHandlers = new LinkedList<RequestHandler>(); @@ -1217,32 +1216,31 @@ public class Application implements Terminal.ErrorListener, Serializable { * * @return The converter factory used in the application */ - // public ConverterFactory getConverterFactory() { - // return converterFactory; - // } - // FIXME: Should not be static - public static ConverterFactory getConverterFactory() { + public ConverterFactory getConverterFactory() { return converterFactory; } /** * Sets the {@link ConverterFactory} used to locate a suitable * {@link Converter} for fields in the application. - * + * <p> * The {@link ConverterFactory} is used to find a suitable converter when * binding data to a UI component and the data type does not match the UI * component type, e.g. binding a Double to a TextField (which is based on a * String). - * + * </p> + * <p> * The {@link Converter} for an individual field can be overridden using * {@link AbstractField#setValueConverter(Converter)}. + * </p> + * <p> + * The converter factory must never be set to null. * * @param converterFactory * The converter factory used in the application */ - // FIXME: Should not be static - public static void setConverterFactory(ConverterFactory converterFactory) { - Application.converterFactory = converterFactory; + public void setConverterFactory(ConverterFactory converterFactory) { + this.converterFactory = converterFactory; } /** |