Changeset 1828 for trunk/grails-app


Ignore:
Timestamp:
May 10, 2011, 11:36:53 AM (10 years ago)
Author:
s.h.sikkema@…
Message:

Fixed only being able to export to tab delimited; fixed 'null' values in export; fixed extra period between filename and extension

Location:
trunk/grails-app
Files:
2 edited

Legend:

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

    r1827 r1828  
    220220
    221221        switch(session.exportFileType) {
    222             case 2: // Comma delimited csv
     222            case '2': // Comma delimited csv
    223223                outputDelimiter = ','
    224                 outputFileExtension = '.csv'
     224                outputFileExtension = 'csv'
    225225                break
    226             case 3: // Semicolon delimited csv
     226            case '3': // Semicolon delimited csv
    227227                outputDelimiter = ';'
    228                 outputFileExtension = '.csv'
     228                outputFileExtension = 'csv'
    229229                break
    230230            default: // Tab delimited with .txt extension
    231231                outputDelimiter = '\t'
    232                 outputFileExtension = '.txt'
     232                outputFileExtension = 'txt'
    233233        }
    234234
  • trunk/grails-app/services/dbnp/studycapturing/AssayService.groovy

    r1827 r1828  
    528528              if (it instanceof Number) return it
    529529
    530               def s = it.toString()
     530              def s = it?.toString() ?: ''
    531531
    532532              def addQuotes = false
Note: See TracChangeset for help on using the changeset viewer.