Changeset 176 for trunk/grails-app/controllers/SandboxController.groovy
- Timestamp:
- Feb 8, 2010, 12:42:46 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/controllers/SandboxController.groovy
r162 r176 11 11 def f = st.template.subjectFields 12 12 13 //println st.giveAllFields() 14 13 15 // This is a way to iterate over the fields in your controller 14 16 // And print them to the console … … 22 24 def subject = Subject.findByName('A1') 23 25 println st.template.getSubjectFieldType('Age') 24 println subject.getFieldValue('Age') 25 26 26 println subject.getFieldValue('Genotype') 27 subject.setFieldValue('Genotype','wildtype') 28 println subject.getFieldValue('Genotype') 29 subject.setFieldValue('name','hallo') 30 println subject.name 31 27 32 // Specify which variables we want to be available in the controller (implicit return statement) 28 33 [fields: f, subjects: st.subjects]
Note: See TracChangeset
for help on using the changeset viewer.