Here is a sample implementation of this feature that could probably use a bit more work. I decided today to experiment with making scaffolding more useful "out of the box" and more usable on a regular basis.
The idea is that you can have custom editors for a given type, and that you can override it on a per-domain level or even a per-property level (that last bit should be using a different path than what I've used here, but I think there's enough here to get the gist of it). This kinda relates to what is described in http://grails.org/Data+Binding+and+PropertyEditors .
Largely the work involved a refactoring of DefaultGrailsTemplateGenerator.groovy from src/scaffolding/org/codehaus/groovy/grails/scaffolding to be more flexible.
The end result is that the templated editors become much more readable, and the convenience to app developers is nice. A potential downside is some exposure of internal Grails workings; but then again, that was already there in what was in the scaffolding already.
I should admit that there's some stuff in here that goes beyond what is described in the bug. It also has a feature to hide certain fields in the show and list views by defining a "hidden" property (yeah, I think a different name would be better, but this was a bangup prototype)..
Anyway, I hope you find this prototyping work useful. It probably wouldn't take much to turn this into production code.
Here is a sample implementation of this feature that could probably use a bit more work. I decided today to experiment with making scaffolding more useful "out of the box" and more usable on a regular basis.
The idea is that you can have custom editors for a given type, and that you can override it on a per-domain level or even a per-property level (that last bit should be using a different path than what I've used here, but I think there's enough here to get the gist of it). This kinda relates to what is described in http://grails.org/Data+Binding+and+PropertyEditors .
Largely the work involved a refactoring of DefaultGrailsTemplateGenerator.groovy from src/scaffolding/org/codehaus/groovy/grails/scaffolding to be more flexible.
The end result is that the templated editors become much more readable, and the convenience to app developers is nice. A potential downside is some exposure of internal Grails workings; but then again, that was already there in what was in the scaffolding already.
I should admit that there's some stuff in here that goes beyond what is described in the bug. It also has a feature to hide certain fields in the show and list views by defining a "hidden" property (yeah, I think a different name would be better, but this was a bangup prototype)..
Anyway, I hope you find this prototyping work useful. It probably wouldn't take much to turn this into production code.