Changeset 252 for trunk/grails-app/controllers
- Timestamp:
- Mar 9, 2010, 4:29:53 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/controllers/dbnp/studycapturing/WizardController.groovy
r250 r252 56 56 [title: 'Done'] // finish page 57 57 ] 58 59 58 } 60 59 … … 91 90 } 92 91 on("switchTemplate") { 92 // handle study data 93 93 this.handleStudy(flow, flash, params) 94 95 // remove errors as we don't want any warnings now 96 flash.errors = [:] 94 97 }.to "study" 95 98 on("previous") { 96 flash.errors = new LinkedHashMap()99 flash.errors = [:] 97 100 98 101 if (this.handleStudy(flow, flash, params)) { … … 103 106 }.to "start" 104 107 on("next") { 105 flash.errors = new LinkedHashMap()108 flash.errors = [:] 106 109 107 110 if (this.handleStudy(flow, flash, params)) { … … 121 124 if (!flow.subjects) { 122 125 flow.subjects = [] 123 flow.subjectTemplates = new LinkedHashMap()126 flow.subjectTemplates = [:] 124 127 } 125 128 } … … 157 160 }.to "subjects" 158 161 on("next") { 159 flash.errors = new LinkedHashMap()162 flash.errors = [:] 160 163 161 164 // check if we have at least one subject … … 172 175 }.to "eventDescriptions" 173 176 on("previous") { 174 flash.errors = new LinkedHashMap()177 flash.errors = [:] 175 178 176 179 // handle form data … … 213 216 } else { 214 217 // validation failed, feedback errors 215 flash.errors = new LinkedHashMap()218 flash.errors = [:] 216 219 flash.values = params 217 220 this.appendErrors(eventDescription, flash.errors) … … 243 246 }.to "eventDescriptions" 244 247 on("previous") { 245 flash.errors = new LinkedHashMap()248 flash.errors = [:] 246 249 247 250 // handle form data … … 254 257 }.to "subjects" 255 258 on("next") { 256 flash.errors = new LinkedHashMap()259 flash.errors = [:] 257 260 258 261 // check if we have at least one subject … … 314 317 } else { 315 318 // validation failed, feedback errors 316 flash.errors = new LinkedHashMap()319 flash.errors = [:] 317 320 flash.values = params 318 321 this.appendErrors(event, flash.errors) … … 389 392 flash.values = params 390 393 391 flash.errors = new LinkedHashMap()394 flash.errors = [:] 392 395 393 396 // handle event groupings … … 402 405 error() 403 406 } 404 }.to " events"407 }.to "confirm" 405 408 } 406 409 … … 410 413 flow.page = 6 411 414 } 415 on("toStudy").to "study" 416 on("toSubjects").to "subjects" 417 on("toEvents").to "events" 412 418 on("previous") { 413 419 // do nothing … … 470 476 } else { 471 477 // validation failed, feedback errors 472 flash.errors = new LinkedHashMap()478 flash.errors = [:] 473 479 this.appendErrors(flow.study, flash.errors) 474 480 return false … … 484 490 */ 485 491 def handleEventDescriptions(flow, flash, params) { 486 def names = new LinkedHashMap()492 def names = [:] 487 493 def errors = false 488 494 def id = 0 … … 543 549 */ 544 550 def handleSubjects(flow, flash, params) { 545 def names = new LinkedHashMap();551 def names = [:]; 546 552 def errors = false; 547 553 def id = 0; … … 618 624 */ 619 625 def getHumanReadableErrors(object) { 620 def errors = new LinkedHashMap()626 def errors = [:] 621 627 622 628 object.errors.getAllErrors().each() {
Note: See TracChangeset
for help on using the changeset viewer.