Changeset 305
- Timestamp:
- Jan 29, 2010, 2:29:26 PM (15 years ago)
- Location:
- trunk/grails-app
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/controllers/AssetDetailedController.groovy
r302 r305 236 236 } 237 237 else { 238 return [ assetInstance : assetInstance ]238 return [ assetInstance : assetInstance, possibleAssetSubItems: assetService.possibleAssetSubItems() ] 239 239 } 240 240 } … … 251 251 252 252 assetInstance.errors.rejectValue("version", "asset.optimistic.locking.failure", "Another user has updated this Asset while you were editing.") 253 render(view:'edit',model:[assetInstance:assetInstance ])253 render(view:'edit',model:[assetInstance:assetInstance, possibleAssetSubItems: assetService.possibleAssetSubItems()]) 254 254 return 255 255 } … … 265 265 } 266 266 else { 267 render(view:'edit',model:[assetInstance:assetInstance ])267 render(view:'edit',model:[assetInstance:assetInstance, possibleAssetSubItems: assetService.possibleAssetSubItems()]) 268 268 } 269 269 } -
trunk/grails-app/services/AssetService.groovy
r284 r305 2 2 3 3 boolean transactional = false 4 5 /** 6 * Determines and returns a possible list of asset sub items. 7 * @returns A list of the possible assetSubItems. 8 */ 9 def possibleAssetSubItems() { 10 def criteria = AssetSubItem.createCriteria() 11 def possibleAssetSubItems = criteria.list() { 12 isNull("parentItem") 13 } 14 } 4 15 5 16 def create(params) {
Note: See TracChangeset
for help on using the changeset viewer.