Changeset 548 for trunk/grails-app/controllers
- Timestamp:
- May 27, 2010, 8:47:06 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/controllers/AppCoreController.groovy
r531 r548 213 213 @Secured(['ROLE_AppAdmin']) 214 214 def createBulkTestData = { 215 if(!createBulkDataService.create()) { 216 flash.message = "Bulk test data could not be created." 217 redirect(action: appAdmin) 218 return 219 } 220 221 // Success. 222 flash.message = "Bulk test data created." 215 def result = createBulkDataService.createAll() 216 if(!result.error) { 217 flash.message = g.message(code:"default.create.success", args:["Bulk test data", '']) 218 redirect(action: appAdmin) 219 return 220 } 221 222 flash.errorMessage = g.message(code: result.error.code, args: result.error.args) 223 redirect(action: appAdmin) 224 } 225 226 /** 227 * Allow admin to create bulk inventory test data. 228 */ 229 @Secured(['ROLE_AppAdmin']) 230 def createBulkInventoryTestData = { 231 def result = createBulkDataService.createBulkInventoryTestData() 232 if(!result.error) { 233 flash.message = g.message(code:"default.create.success", args:["Bulk test data", '']) 234 redirect(action: appAdmin) 235 return 236 } 237 238 flash.errorMessage = g.message(code: result.error.code, args: result.error.args) 223 239 redirect(action: appAdmin) 224 240 }
Note: See TracChangeset
for help on using the changeset viewer.