In Grails, one can 'bindData' in controller:
Book b = new Book()
bindData(b, params)
What if I have a date field with specific format (e.g. yyyy-MM-dd) from user input? In Spring, we can use registerCustomEditor(). How about Grails?
In Grails, one can 'bindData' in controller:
Book b = new Book()
bindData(b, params)
What if I have a date field with specific format (e.g. yyyy-MM-dd) from user input? In Spring, we can use registerCustomEditor(). How about Grails?
Have you already come across the Extended Data Binding Plugin?
From the documentation on the site, it appears to offer both aspects which you are referring to
Allow customization of the DataBinder that will be used to parse user-defined input and populate objects (typically domain objects) with custom PropertyEditors on both application-wide and controller-specific levels.as String.
Extend controllers with dynamic methods to allow data binding and bean wrapping.
With Grails 1.1.1, you can implement a PropertyEditorRegistrar and use that to specify a format. See http://www.nabble.com/Grails-1.1.1-change-in-binding-date-properties-td23546175.html