I want to be able to define view table headers in domain classes. I thought about creating a transient property called inTable and then iterate through its values in scaffolding template. Here is a transient property:
List inTable=['cardId','fullName','dateOfBirth','sex','bloodGroup','civilStatus','status']
Now How can I get inTable values inside my scaffolding template?
Make it a static field of your domain class.
Take a look at the way regular scaffolding iterates the class properties. (run grails install-templates
if you haven't yet)
Access domainClass.getClazz().inTable
.