Ignore:
Timestamp:
Feb 8, 2011, 3:53:49 PM (10 years ago)
Author:
t.w.abma@…
Message:
  • fuzzy matching and don't import improved in the properties step of the importer wizard, by default properties are not matched against the Excel fields, but one can now manually apply fuzzy matching
  • added initial fields to ImportMapping? domain
File:
1 edited

Legend:

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

    r1481 r1505  
    9494         * @param matchvalue value which will be looked up via fuzzy matching against the list of options and will be selected
    9595         * @param MappingColumn object containing all required information
     96     * @param fuzzymatching boolean true if fuzzy matching should be used, otherwise false
    9697         * @param allfieldtypes boolean true if all templatefields should be listed, otherwise only show filtered templatefields
    9798         * @return chooser object
     
    103104                def t = Template.get(attrs['template_id'])
    104105                def mc = attrs['mappingcolumn']
    105                 def allfieldtypes = attrs['allfieldtypes']
    106                 def matchvalue = attrs['matchvalue']
    107                 def domainfields = mc.entity.giveDomainFields().findAll { it.type == mc.templatefieldtype }
     106                def allfieldtypes = attrs['allfieldtypes']             
     107        def matchvalue = (attrs['fuzzymatching']=="true") ? attrs['matchvalue'] : ""
     108
     109        def domainfields = mc.entity.giveDomainFields().findAll { it.type == mc.templatefieldtype }
    108110                domainfields = domainfields.findAll { it.preferredIdentifier != mc.identifier}
    109111
     
    133135        def createPropertySelect(String name, options, matchvalue, Integer columnIndex) {
    134136                // Determine which field in the options list matches the best with the matchvalue
    135                 def mostsimilar = ImporterService.mostSimilar(matchvalue, options)
     137                def mostsimilar = (matchvalue) ? ImporterService.mostSimilar(matchvalue, options) : ""
    136138
    137139                def res = "<select style=\"font-size:10px\" id=\"${name}.index.${columnIndex}\" name=\"${name}.index.${columnIndex}\">"
Note: See TracChangeset for help on using the changeset viewer.