Changeset 338
- Timestamp:
- Apr 12, 2010, 3:11:34 PM (13 years ago)
- Location:
- trunk/grails-app
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/controllers/SandboxController.groovy
r253 r338 47 47 48 48 // Specify which variables we want to be available in the controller (implicit return statement) 49 [fields: f, subjects: st.subjects, studyInstance: st ]49 [fields: f, subjects: st.subjects, studyInstance: st, subject: Subject.findByName('A1')] 50 50 } 51 52 51 53 } -
trunk/grails-app/domain/dbnp/studycapturing/TemplateEntity.groovy
r336 r338 332 332 * Return all templated fields defined in the underlying template of this entity 333 333 */ 334 def Set<TemplateField> giveFields() {334 def List<TemplateField> giveFields() { 335 335 return this.template.fields; 336 336 } -
trunk/grails-app/domain/dbnp/studycapturing/TemplateField.groovy
r300 r338 15 15 String comment // help string for the user interface 16 16 17 static hasMany = [listEntries : TemplateFieldListItem] // to store the entries to choose from when the type is 'item from predefined list' 17 List listEntries 18 static hasMany = [listEntries : TemplateFieldListItem] // to store the entries to choose from when the type is 'item from predefined list' 18 19 19 20 static constraints = { -
trunk/grails-app/views/sandbox/index.gsp
r299 r338 32 32 <h2>Events</h2> 33 33 <% println studyInstance.events.eventDescription.protocol.name %> 34 <h2>Subject Fields</h2> 35 <table> 36 <tr> 37 <td>Source</td> 38 <td>Name</td> 39 <td>Type</td> 40 </tr> 41 <g:each in="${subject.giveDomainFields()}" var="field"> 42 <tr> 43 <td>Domain field</td> 44 <td>${field.key}</td> 45 <td>${field.value}</td> 46 </tr> 47 </g:each> 48 <g:each in="${subject.giveFields()}" var="field"> 49 <tr> 50 <td>Template field</td> 51 <td>${field.name}</td> 52 <td>${field.type}</td> 53 </tr> 54 </g:each> 55 56 </table> 34 57 </body> 35 58 </html>
Note: See TracChangeset
for help on using the changeset viewer.