You can buy this project and download/modify it how often you want.
<% org.devocative.devolcano.vo.ClassVO cls = targetClass %> <% boolean hasNotSimpleText = false cls.allFieldsMap.each { String name, org.devocative.devolcano.vo.FieldVO field -> if (field.ok && field.hasForm) { if (!field.isOf(String) || field.textType == "simple") { out << """\t\t\t\t\n""" } else { hasNotSimpleText = true } } } %> <% if(hasNotSimpleText) { out << "\t\t\t\n" cls.allFieldsMap.each { String name, org.devocative.devolcano.vo.FieldVO field -> if(field.ok && field.hasForm && field.isOf(String) && field.textType != "simple") { out << "\t\t\t\t\n" out << "\t\t\t\t\t ${field.required ? '*' : ''}\n" String cell if(field.textType == "multiline") { cell = """""" } else if(field.textType == "html") { //TODO implement HTML throw new RuntimeException("HTML not implemented: ${name}") } else if(field.textType == "code") { cell = """""" } else { cell = "Unknown textType=[${field.textType}] for field=[${name}]" } out << "\t\t\t\t\t${cell}\n" out << "\t\t\t\t\n" } } out << "\t\t\t\n" } %>