Changeset 105 for trunk/grails-app/controllers
- Timestamp:
- Jan 22, 2010, 12:37:14 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/controllers/dbnp/studycapturing/WizardController.groovy
r103 r105 48 48 flow.page = 0 49 49 flow.pages = [ 50 [title: 'Study'], 50 [title: 'Study'], // study 51 51 [title: 'Twoooo'], 52 52 [title: 'Trois'] … … 55 55 } 56 56 57 // render the main wizard page 57 // render the main wizard page which immediately 58 // triggers the 'next' action (hence, the main 59 // page dynamically renders the study template 60 // and makes the flow jump to the study logic) 58 61 mainPage { 59 62 render(view: "/wizard/index") … … 64 67 } 65 68 69 // render the study page and handle study logic 66 70 study { 67 71 render(view: "_study") … … 72 76 on("next") { 73 77 // create a study instance 74 println params75 78 flow.study = new Study(params) 76 79 77 80 // validate study 78 81 if (flow.study.validate()) { 79 println "study validates"82 success() 80 83 } else { 81 84 // validation failed, feedback errors 82 85 flash.errors = new LinkedHashMap() 83 86 this.appendErrors(flow.study,flash.errors) 84 println "errorrrs"85 println flash.errors86 87 error() 87 88 } … … 154 155 } 155 156 } 156 157 157 }
Note: See TracChangeset
for help on using the changeset viewer.