Changeset 150 for trunk/grails-app/controllers/dbnp/studycapturing/EventDescriptionController.groovy
- Timestamp:
- Jan 29, 2010, 6:08:49 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/controllers/dbnp/studycapturing/EventDescriptionController.groovy
r123 r150 47 47 48 48 def showMyProtocol = { 49 println params // dbg, remove 49 50 50 def protocol = ( params.protocol ) ? Protocol.get(params.protocol) : Protocol.find("for Protocol id")51 def description = EventDescription.get(params.id)52 def protocolInstance = description.protocol51 def protocol = ( params.protocolid) ? Protocol.get(params.protocolid) : Protocol.find("for Protocol id") 52 def event = Event.get(params.id) 53 def protocolInstance = event.eventDescription.protocol 53 54 54 55 println params 56 println event 55 57 println protocol 56 println description57 58 println protocolInstance 58 59 59 60 if( protocol.id==protocolInstance.protocol.id ) { 61 println "redner this FILLED rubish" 62 println protocolInstance 63 println "the fuck?" 64 render( view:"showMyProtocolFilled", model:["protocolInstance":protocolInstance] ) 60 if( protocolInstance && protocolInstance && protocol.id==protocolInstance.id ) { 61 def parameterStringValues = event.parameterStringValues 62 println parameterStringValues 63 print "showFull" 64 render( view:"showMyProtocolFilled", model:["protocolInstance":protocolInstance,"event":event,"parameterStringValues":parameterStringValues] ) 65 65 } 66 66 else { 67 print ln "redner this EMPTY rubish"68 render( view: "showMyProtocolEmpty", model:[protocol:protocol] )69 //render( view:"showMyProtocolEmpty", model:[protocol:protocol])67 print "showEmpty" 68 if(protocol!=null) render( view: "showMyProtocolEmpty", model:["protocolInstance":protocol] ) 69 else render( "NULL" ) 70 70 } 71 71 } … … 131 131 132 132 133 /* Jahn - For development only 134 * Create one dummy instance of EventDescription */ 135 def createDummies = 136 { 137 def newInstance = new EventDescription() 138 newInstance.name = "dummmy name" 139 newInstance.description = "dummmy description" 140 newInstance.protocol = ProtocolInstance.find("from ProtocolInstance p ") 141 newInstance.classification = Term.find("from Term t") 142 143 if( newInstance.save() ) 144 { redirect( action:show, id: newInstance.id ) } 145 else { chain( action:list ) } 146 } 147 148 149 def test = { render("test") } 133 def test = { println "test" 134 render("test") } 150 135 }
Note: See TracChangeset
for help on using the changeset viewer.