-
Notifications
You must be signed in to change notification settings - Fork 38.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Formatter support to DataBinder [SPR-6015] #10684
Comments
Juergen Hoeller commented A DataBinder may pick up a FormatterRegistry reference via setFormatterRegistry, or configure its own local registry via dataBinder.getFormatterRegistry().add(...) ConfigurableWebBindingInitializer - as supported by our AnnotationMethodHandlerAdapters through their "webBindingInitializer" property - accepts a "formatterRegistry" property as well, applying to all DataBinders created for Furthermore, we have support for a shared "conversionService" bean in an ApplicationContext now: picked up by the ApplicationContext's internal BeanFactory as well as by GenericFormatterRegistry bean definitions. Juergen |
Oliver Drotbohm commented Hi guys, I am quite puzzled about this ticket as it is marked as fixed but apprently it seems it isn't. Although there were commits on the Formatter classes, the actual Regards, |
Burkhard Graves commented Albeit this task is more than two years old: Are there any news concerning the registration of "field-specific" formatters? --dhukas |
Oliver Drotbohm commented As the ticket says, released in Spring 3.0 RC1. |
Burkhard Graves commented But dataBinder has no method getFormatterRegistry (at least in Spring 3.1.1)!? How can "field-specific" formatters be registered in a method annotated with |
Burkhard Graves commented
|
Juergen Hoeller commented I can't recall what happened to this back then: We might have considered it good enough to be able to specify a custom But point taken, a more convenient way to register specific custom formatters on a local binder instance, in addition to delegating to a shared Juergen |
Keith Donald opened SPR-6015 and commented
Support for the Formatter/FormatterRegistry SPI/API should be added to DataBinder, as an alternative to working with PropertyEditors. Existing PropertyEditor support should remain unaffected.
New proposed methods:
registerFormatter(Class type, Formatter formatter); registerFormatter(Class type, String field, Formatter formatter);
setFormatterRegistry(FormatterRegistry);
Issue Links:
Referenced from: commits 20f5f99
The text was updated successfully, but these errors were encountered: