Search code examples
grailsview

grails 2 Add new column to f:table


I would like to add a new column with some static values like buttons and links to an existing tag in a view.

Is this possible? In the documentation, I can only find how to add or removes attributes that are part of the domain class. There doesn't seem to be a way to add a column with custom values. Ex: a button with a link to the "show" view and so on.


Solution

  • Looks like (unfortunately) there isn't a standard Grails way to do this.

    I did manage to do this by using tables and loops ... to run the loop and then displaying the values using Grails variables. It would be great though if there was a standard Grails way to do this as it seems to be waste to first use a framework and then discard the scaffolding to write your own custom table!