Changeset 343 for trunk/grails-app/domain
- Timestamp:
- Feb 10, 2010, 2:49:13 AM (15 years ago)
- Location:
- trunk/grails-app/domain
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/domain/Asset.groovy
r329 r343 26 26 } 27 27 28 // This additional setter is used to convert the checkBoxList string 28 // This additional setter is used to convert the checkBoxList string or string array 29 29 // of ids selected to the corresponding domain objects. 30 30 public void setAssetSubItemsFromCheckBoxList(ids) { 31 31 def idList = [] 32 ids.each() { 33 if(it.isInteger()) 34 idList << it.toInteger() 32 if(ids instanceof String) { 33 if(ids.isInteger()) 34 idList << ids.toInteger() 35 } 36 else { 37 ids.each() { 38 if(it.isInteger()) 39 idList << it.toInteger() 40 } 35 41 } 36 42 this.assetSubItems = idList.collect { AssetSubItem.get( it ) } -
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.