Skip to content

Commit

Permalink
Merge branch '6.0.x'
Browse files Browse the repository at this point in the history
  • Loading branch information
rainboyan committed Sep 12, 2024
2 parents e519dec + 33fac5f commit 44f7c8e
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 2 deletions.
49 changes: 48 additions & 1 deletion src/test/groovy/grails/plugin/formfields/mock/Employee.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,53 @@ package grails.plugin.formfields.mock
import grails.persistence.Entity

@Entity
class Employee extends Person {
class Employee {
Salutation salutation
String name
String password
Gender gender
Date dateOfBirth
Address address
Map emails = [:]
boolean minor
Date lastUpdated
String excludedProperty
String displayFalseProperty
Boolean grailsDeveloper
Byte[] picture
byte[] anotherPicture
String biography
int salary

String getTransientText() {
"transient text"
}

static hasMany = [emails: String]
static embedded = ['address']

static constraints = {
salutation nullable: true
name blank: false
dateOfBirth nullable: true
address nullable: true
excludedProperty nullable: true
displayFalseProperty nullable: true, display: false
grailsDeveloper nullable: true
picture nullable: true
anotherPicture nullable: true
password password: true
biography nullable: true, widget: 'textarea'
}

static scaffold = [exclude: ['excludedProperty']]
static transients = ['transientText']
def onLoad = {
println "loaded"
}

@Override
String toString() {
name
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Person {
byte[] anotherPicture
String biography

transient String getTransientText() {
String getTransientText() {
"transient text"
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package grails.plugin.formfields.taglib

import groovy.xml.XmlSlurper
import grails.plugin.formfields.FormFieldsTagLib
import grails.plugin.formfields.FormFieldsTemplateService
import grails.plugin.formfields.mock.Author
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package grails.plugin.formfields.taglib

import groovy.xml.XmlSlurper
import grails.converters.XML
import grails.plugin.formfields.FormFieldsTagLib
import grails.plugin.formfields.FormFieldsTemplateService
Expand Down

0 comments on commit 44f7c8e

Please sign in to comment.