Changeset 372 for trunk/grails-app/controllers/dbnp/studycapturing
- Timestamp:
- Apr 22, 2010, 3:45:22 PM (13 years ago)
- Location:
- trunk/grails-app/controllers/dbnp/studycapturing
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/controllers/dbnp/studycapturing/TemplateEditorController.groovy
r359 r372 14 14 */ 15 15 package dbnp.studycapturing 16 import dbnp.data.* 17 import dbnp.studycapturing.* 16 18 17 19 class TemplateEditorController { … … 20 22 */ 21 23 def index = { 22 // got a template get parameter? 23 def template = (params.template) ? params.template : null 24 // got a entity get parameter? 25 def entity = null 26 if (params.entity) { 27 // decode entity get parameter 28 entity = new String(params.entity.toString().decodeBase64()) 29 } 24 30 25 // enterthe flow!26 redirect(action: 'pages', params:[" template":template])31 // got with the flow! 32 redirect(action: 'pages', params:["entity":entity]) 27 33 } 28 34 … … 33 39 // start the flow 34 40 onStart { 35 println "start template editor flow" 41 println params 42 if (params.entity) { 43 //def name = params.entity 44 //def name = "java.lang.Integer" 45 //println name.class 46 //def S = new dbnp.studycapturing.Study() 36 47 37 if (params.template) { 38 flow.template = template 48 //def name = "dbnp.studycapturing.Study" as Class 49 //println name.newInstance() 50 println Class.forName(new GString("dbnp.studycapturing.Study")) 51 //flow.entity = (name as Class).newInstance() 52 //flow.templates = Template.findAllByEntity(flow.entity) 53 } else { 54 // all templates for all entities; note that normally 55 // this shouldn't happen as this flow is designed to 56 // launch in a jquery dialog, passing an encoded entity 57 flow.templates = Template.findAll() 39 58 } 59 flow.templates = Template.findAll() 40 60 } 41 61 42 62 // main template editor page 43 63 templates { 44 render(view: "/templateEditor/templates" , collection:[templates: Template.findAll()])64 render(view: "/templateEditor/templates") 45 65 onRender { 46 66 println "render templates" 47 println Template.findAll()48 67 } 49 68 on("next").to "start" -
trunk/grails-app/controllers/dbnp/studycapturing/TermEditorController.groovy
r359 r372 53 53 } 54 54 55 // main te mplateeditor page56 te mplates {55 // main term editor page 56 terms { 57 57 render(view: "/termEditor/terms") 58 58 onRender {
Note: See TracChangeset
for help on using the changeset viewer.