|
|
|
[
Permlink
| « Hide
]
Sven Haiges - 24/Aug/06 03:52 AM
Exactly had this issue. As I use HBM files, my only problem was to delete some generated HTML from the GSP and compute the right value for the GORM domain class.
I think this is handled by the simple contraint "display".
It looks like if display is set to false that the edit field is not rendered for Create and Edit views: From src/scaffolding/org/codehaus/groovy/grails/scaffolding/DefaultGrailsTemplateGenerator.groovy (lines 44-45): def display = (cp ? cp.display : true) However, it does not seem that the same check occurs in generateListView or generateShowView. I'll look into it further, but I suspect this is actually a bug where scaffolding templates do not honor the constraint and not a New Feature. The following patch makes the "display" constraint work. Currently, the "display" constraint is honored in scaffolding with Create/Edit.
This patch modifies the templates for List and Show. After this patch is applied, I need to create some documentation for the "display" constraint (which has been present for a while) to: Use this patch instead!
First patch does not handle the "overwrite" variable correctly. I am probably going to try to refactor this class some later. Ignore these patches. Graeme refactored the the scaffolding templates so it makes these invalid.
Yes we already have the "display" constraint. With Drew's patches it will be even better.
I apologize for the delay. I have a bunch of patches related to scaffolding I have to merge. I have patches on my local machine in various phases of flux, including:
1) XHTML output for scaffolding Scaffolding code has changed a good bit and many of my patches now require re-working. I'll try to get them up to speed this week. Please consider the changes in the code in the sandbox for http://grails.org/Scaffolding+of+field+editors
Hi, I do not really understant how it works.
But, has grails been improved to support "hidden property"? Or have I to modify my own grails on my computer? Or delete fields I want to hide from the gsp files? I really would like to use generate-all command without needing to modify gsp for commons screen operations. And I really don't want to modify the grails application. (Too hard to maintain I think.) Thanks. |
|||||||||||||||||||||||||||||||||||||||||||||||||