Show
Ignore:
Timestamp:
02-03-11 17:40:25 (3 years ago)
Author:
s.h.sikkema@…
Message:

UI improvements to assay exporter (ticket #159)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/controllers/dbnp/studycapturing/AssayController.groovy

    r1576 r1583  
    150150            flash.errorMessage = e.message 
    151151            redirect action: 'selectAssay' 
    152                         return; 
     152                        return 
    153153 
    154154        } 
     
    159159        flash.assayId = params.assayId 
    160160 
    161         [fieldMap: fieldMap, measurementTokens: measurementTokens*.name] 
     161        [fieldMap: fieldMap, measurementTokens: measurementTokens.name] 
    162162    } 
    163163 
     
    170170 
    171171        def fieldMap = flash.fieldMap 
    172         def measurementTokens = flash.measurementTokens 
    173172 
    174173        def fieldMapSelection = [:] 
     
    199198        if (params."cat_4" == 'on') { 
    200199 
    201             measurementTokensSelection = params.measurementToken == 'null' ? measurementTokens : [ name: params.measurementToken] 
     200            def measurementToken = params.measurementToken 
     201 
     202            if (measurementToken) { 
     203 
     204                if (measurementToken instanceof String) 
     205                    measurementTokensSelection = [[name: measurementToken]] 
     206                else 
     207                    measurementTokensSelection = measurementToken.collect{[name: it]} 
     208 
     209            } else { 
     210                measurementTokensSelection = flash.measurementTokens 
     211            } 
    202212 
    203213        }