Changeset 343 for trunk/grails-app/domain/Person.groovy
- Timestamp:
- Feb 10, 2010, 2:49:13 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/domain/Person.groovy
r294 r343 55 55 String toString() {"${this.firstName} ${this.lastName}"} 56 56 57 // This additional setter is used to convert the checkBoxList string 57 // This additional setter is used to convert the checkBoxList string or string array 58 58 // of ids selected to the corresponding domain objects. 59 59 public void setPersonGroupsFromCheckBoxList(ids) { 60 60 def idList = [] 61 ids.each() { 62 if(it.isInteger()) 63 idList << it.toInteger() 61 if(ids instanceof String) { 62 if(ids.isInteger()) 63 idList << ids.toInteger() 64 } 65 else { 66 ids.each() { 67 if(it.isInteger()) 68 idList << it.toInteger() 69 } 64 70 } 65 71 this.personGroups = idList.collect { PersonGroup.get( it ) }
Note: See TracChangeset
for help on using the changeset viewer.