Changeset 414 for trunk/grails-app/controllers
- Timestamp:
- May 12, 2010, 12:12:33 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/controllers/dbnp/studycapturing/WizardController.groovy
r411 r414 619 619 // iterate through fields (= template fields and domain properties) 620 620 flow.subjects[ subjectId ].giveFields().each() { subjectField -> 621 def value = params.get( 'subject_' + subjectId + '_' + subjectField.escapedName() )622 623 /*** THIS SHOULD PROBABLY MOVE INTO TEMPLATE ENTITY ***/624 // handle ontology terms625 if (value instanceof String && subjectField.type.toString() == "ONTOLOGYTERM") {626 // iterate through ontologies and find term627 subjectField.ontologies.each() { ontology ->628 def term = ontology.giveTermByName( value )629 630 // found a term?631 if (term) {632 value = term633 }634 }635 }636 /*** END ***/637 638 621 // set the field 639 622 flow.subjects[ subjectId ].setFieldValue( 640 623 subjectField.name, 641 value624 params.get( 'subject_' + subjectId + '_' + subjectField.escapedName() ) 642 625 ) 643 626 }
Note: See TracChangeset
for help on using the changeset viewer.