grails / grails-core

The Grails Web Application Framework
http://grails.org
Apache License 2.0
2.78k stars 950 forks source link

GRAILS-2618: GrailsDataBinder: allow to register custom editor? #8583

Closed graemerocher closed 9 years ago

graemerocher commented 16 years ago

Original Reporter: mguillem Environment: Not Specified Version: 1.0.1 Migrated From: http://jira.grails.org/browse/GRAILS-2618

GrailsDataBinder doesn't allow to register custom editors (for custom types or to fix problems with Grails' editors). It would be useful to have this possibility.

Graeme's response in the mailing list:

This is correct, my preference for a solution would be for the GrailsDataBinder to look for all beans in the application context of type PropertyEditor this would allow new registration simply be adding

to resources.groovy or in plugins

graemerocher commented 16 years ago

mguillem said: I would probably prefer to explicitly register my editor(s) but I still don't have a full picture and the most important is to have a way to achieve it.

graemerocher commented 16 years ago

karaznie said: This is really important addition to Grails towards real-life use cases.

graemerocher commented 15 years ago

graemerocher said: Thanks for the patch, I think its the best approach.