Changeset 1143 for trunk/grails-app/taglib
- Timestamp:
- Nov 16, 2010, 11:47:46 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/taglib/dbnp/importer/ImporterTagLib.groovy
r1141 r1143 140 140 def createPropertySelect(String name, options, matchvalue, Integer columnIndex) 141 141 { 142 // String.metaClass.mostSimilarTo = { ImporterService.mostSimilar(delegate, it) }143 //println "mostsimilar="+ImporterService.mostSimilar(matchvalue, options)142 // Determine which field in the options list matches the best with the matchvalue 143 def mostsimilar = ImporterService.mostSimilar(matchvalue, options) 144 144 145 145 def res = "<select style=\"font-size:10px\" name=\"${name}.index.${columnIndex}\">" 146 146 147 res += "<option value=\"dontimport\" selected>Don't import</option>"147 res += "<option value=\"dontimport\">Don't import</option>" 148 148 149 149 options.each { f -> 150 res+= "<option value=\"${f.name}\">" 151 150 res+= "<option value=\"${f.name}\"" 151 152 res+= (mostsimilar.toString().toLowerCase()==f.name.toLowerCase()) ? 153 " selected>" : 154 ">" 155 152 156 res+= (f.preferredIdentifier) ? 153 157 "${f.name} (IDENTIFIER)</option>" :
Note: See TracChangeset
for help on using the changeset viewer.