Changeset 661
- Timestamp:
- Jul 19, 2010, 4:10:09 PM (11 years ago)
- Location:
- trunk/grails-app
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/controllers/dbnp/importer/ImporterController.groovy
r660 r661 212 212 213 213 // Find actual Template object from the chosen template name 214 def template = Template.get(session.importe d_template_id)214 def template = Template.get(session.importer_template_id) 215 215 216 216 params.columnproperty.index.each { columnindex, property -> … … 224 224 session.importer_header[columnindex.toInteger()].property = property 225 225 // Look up the template field type of the target TemplateField and store it also in the map 226 session.importer_header[columnindex.toInteger()].templatefieldtype = entityObj.g iveFields()[property].type226 session.importer_header[columnindex.toInteger()].templatefieldtype = entityObj.getFieldType(property) 227 227 228 228 //if it's an identifier set the mapping column true or false -
trunk/grails-app/domain/dbnp/studycapturing/TemplateEntity.groovy
r572 r661 658 658 } 659 659 } 660 661 /** 662 * Look up the type of a certain template subject field 663 * @param String fieldName The name of the template field 664 * @return String The type (static member of TemplateFieldType) of the field, or null of the field does not exist 665 */ 666 def TemplateFieldType getFieldType(String fieldName) { 667 def field = this.giveFields().find { 668 it.name == fieldName 669 } 670 field?.type 671 } 660 672 }
Note: See TracChangeset
for help on using the changeset viewer.