
|
If you were logged in you would be able to see more operations.
|
|
|
Grails
Created: 10/Feb/07 01:14 PM
Updated: 13/May/08 04:30 AM
|
|
| Component/s: |
Scaffolding
|
| Affects Version/s: |
0.4.1
|
| Fix Version/s: |
1.2
|
|
|
File Attachments:
|
1.
src.zip (9 kb)
|
|
|
It would be nice to be able to scaffold a view and have specific fields (i.e. password, icon picker, etc) where the editor could be customized to the user's liking, without needing to customize the scaffolding views to support this feature.
|
|
Description
|
It would be nice to be able to scaffold a view and have specific fields (i.e. password, icon picker, etc) where the editor could be customized to the user's liking, without needing to customize the scaffolding views to support this feature. |
Show » |
|
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.