Changeset 633 for trunk/grails-app/domain/Person.groovy
- Timestamp:
- Jul 19, 2010, 8:47:38 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/domain/Person.groovy
r402 r633 7 7 tasks: Task, 8 8 contacts: Contact, 9 addresses: Address] 9 addresses: Address, 10 purchasingGroups: PurchasingGroup] 10 11 11 12 static belongsTo = [Authority] … … 68 69 } 69 70 71 // This additional setter is used to convert the checkBoxList string or string array 72 // of ids selected to the corresponding domain objects. 73 public void setPurchasingGroupsFromCheckBoxList(ids) { 74 def idList = [] 75 if(ids instanceof String) { 76 if(ids.isInteger()) 77 idList << ids.toInteger() 78 } 79 else { 80 ids.each() { 81 if(it.isInteger()) 82 idList << it.toInteger() 83 } 84 } 85 this.purchasingGroups = idList.collect { PurchasingGroup.get( it ) } 86 } 87 70 88 } // end class
Note: See TracChangeset
for help on using the changeset viewer.