% import grails.persistence.Event %>
<% excludedProps = Event.allEvents.toList() << 'id' << 'version'
allowedNames = domainClass.persistentProperties*.name << 'dateCreated' << 'lastUpdated'
props = domainClass.properties.findAll { allowedNames.contains(it.name) && !excludedProps.contains(it.name) && it.type != null && !Collection.isAssignableFrom(it.type) }
Collections.sort(props, comparator.constructors[0].newInstance([domainClass] as Object[]))
props.eachWithIndex { p, i ->
if (i < 6) {
if (p.isAssociation()) { %>
| ${p.naturalName} |
<% } else { %>
${p.naturalName} |
<% } } } %>
<% props.eachWithIndex { p, i -> %>
| {{item.${p.name}}} |
<% } %>