Changeset 245 for trunk/grails-app/taglib
- Timestamp:
- Mar 8, 2010, 5:53:30 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/taglib/dbnp/importer/ImporterTagLib.groovy
r231 r245 19 19 class ImporterTagLib { 20 20 static namespace = 'importer' 21 def standardentities = [[type: 0, name:"Study"], [type:1, name:"Subject"], [type:2, name:"Event"],21 def standardentities = [[type:-1, name:"Don't import"], [type:0, name:"Study"], [type:1, name:"Subject"], [type:2, name:"Event"], 22 22 [type:3, name:"Protocol"], [type:4, name:"Sample"]] 23 23 … … 43 43 44 44 /** 45 * @param entities array of entity:columnindex values45 * @param entities array in the format of columnindex:entitytype format 46 46 */ 47 47 def properties = { attrs -> … … 51 51 attrs['entities'].each { se -> 52 52 def temp = se.split(":") 53 def entity = [type:temp[ 0],columnindex:temp[1]]53 def entity = [type:temp[1],columnindex:temp[0]] 54 54 selectedentities.add(entity) 55 55 } … … 62 62 63 63 options.each { e -> 64 res += "<option value=\"${ e.type}:${customvalue}\""64 res += "<option value=\"${customvalue}:${e.type}\"" 65 65 res += (e.type.toInteger() == selected) ? " selected" : "" 66 66 res += ">${e.name}</option>" … … 84 84 85 85 switch (attrs['entitytype']) { 86 case 0 : create Select(-1, "property", t.fields, "1")87 break86 case 0 : createPropertySelect(attrs['name'], t.fields, columnindex) 87 break 88 88 case 1 : break 89 89 case 2 : break 90 90 case 3 : break 91 default : out << createPropertySelect( "property", t.fields, columnindex)91 default : out << createPropertySelect(attrs['name'], t.fields, columnindex) 92 92 break 93 93 }
Note: See TracChangeset
for help on using the changeset viewer.