Changeset 407
- Timestamp:
- May 11, 2010, 4:01:58 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/controllers/dbnp/studycapturing/WizardController.groovy
r404 r407 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 terms 625 if (value instanceof String && subjectField.type.toString() == "ONTOLOGYTERM") { 626 // iterate through ontologies and find term 627 subjectField.ontologies.each() { ontology -> 628 def term = ontology.giveTermByName( value ) 629 630 // found a term? 631 if (term) { 632 value = term 633 } 634 } 635 } 636 /*** END ***/ 637 621 638 // set the field 622 639 flow.subjects[ subjectId ].setFieldValue( 623 640 subjectField.name, 624 params.get( 'subject_' + subjectId + '_' + subjectField.escapedName() )641 value 625 642 ) 626 643 }
Note: See TracChangeset
for help on using the changeset viewer.