Ignore:
Timestamp:
Jun 4, 2010, 4:00:31 PM (13 years ago)
Author:
tabma
Message:
  • rewrote MappingColumn? (and underlying methods) to have a String property instead of TemplateField?
  • improved Excel-column detection to importer service
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/taglib/dbnp/importer/ImporterTagLib.groovy

    r492 r534  
    8484        def allfieldtypes = attrs['allfieldtypes']
    8585
    86         def templatefields = (allfieldtypes=="true") ? t.fields : t.fields.findAll { it.type == mc.templatefieldtype }
     86        //def templatefields = (allfieldtypes=="true") ? t.fields : t.fields.findAll { it.type == mc.templatefieldtype }
     87        def templatefields = (allfieldtypes=="true") ?
     88            t.fields + mc.entity.giveDomainFields() :
     89            t.fields.findAll { it.type == mc.templatefieldtype } + mc.entity.giveDomainFields()
    8790
    8891        (mc.identifier) ? out << "<select style=\"font-size:10px\" name=\"\" disabled><option>Identifier</option></select>":
     
    102105        def res = "<select style=\"font-size:10px\" name=\"${name}.index.${columnIndex}\">"
    103106
    104         options.each { f ->         
    105             res += "<option value=\"${f.id}\""
    106             //res += (e.type.toInteger() == selected) ? " selected" : ""
    107             res += ">${f}</option>"
     107        options.each { f ->
     108            res+= "<option value=\"${f.name}\">"
     109           
     110            res+= (f.preferredIdentifier) ?
     111                    "${f.name} (IDENTIFIER)</option>" :
     112                    "${f.name}</option>"
    108113        }
    109114
Note: See TracChangeset for help on using the changeset viewer.