- Timestamp:
- May 27, 2010, 1:13:50 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/taglib/dbnp/importer/ImporterTagLib.groovy
r415 r485 22 22 class ImporterTagLib { 23 23 static namespace = 'importer' 24 def standardentities = [[type:-1, name:"Don't import"], [type:0, name:"Study"], [type:1, name:"Subject"], [type:2, name:"Event"],25 [type:3, name:"Protocol"], [type:4, name:"Sample"]]26 24 27 25 /** … … 53 51 54 52 /** 55 * @param entities array 53 * @param entities array containing selected entities 56 54 */ 57 55 def properties = { attrs -> 58 def selectedentities = []59 56 def header = attrs['header'] 57 def entities = attrs['entities'] 60 58 61 attrs['entities'].index.each { columnindex, entitytype -> 62 def entity = [type:entitytype,columnindex:columnindex.toInteger()] 63 selectedentities.add(entity) 64 } 65 66 out << render (template:"common/properties", model:[selectedentities:selectedentities, standardentities:standardentities, header:header]) 59 out << render ( template:"common/properties", 60 model:[selectedentities:entities, 61 standardentities:grailsApplication.config.gscf.domain.importableEntities, 62 header:header]) 67 63 } 68 64 … … 124 120 def res = "<select style=\"font-size:10px\" name=\"${name}.index.${custval}\">" 125 121 126 standardentities.each { e ->127 res += "<option value=\"${e. type}\""128 res += (e. type == sel) ? " selected" : ""129 res += ">${e. name}</option>"122 grailsApplication.config.gscf.domain.importableEntities.each { e -> 123 res += "<option value=\"${e.value.name}\"" 124 res += (e.value.type == sel) ? " selected" : "" 125 res += ">${e.value.name}</option>" 130 126 } 131 127
Note: See TracChangeset
for help on using the changeset viewer.