Ignore:
Timestamp:
Nov 6, 2010, 4:01:11 PM (10 years ago)
Author:
t.w.abma@…
Message:
  • failed cells correction now implemented in an extra step which allows the user to specify a corrected ontology value
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/controllers/dbnp/importer/ImporterController.groovy

    r1090 r1093  
    154154     * the original value which was read from the Excel file.
    155155     *
    156      * @param cell array of cells with updated ontologies
     156     * @param cell array of cells with corrected cells (ontologies)
    157157     *
    158158    */
     
    161161
    162162        // Loop through the form with cell fields and values
    163         params.cell.index.each { cellhashcode, value ->
    164             correctedcells.put(cellhashcode, value)
     163        params.cell.index.each { mappingcolumnhash, value ->
     164            correctedcells.put(mappingcolumnhash, value)
    165165        }
    166166
     
    168168        ImporterService.saveCorrectedCells(
    169169                    session.importer_importeddata,
    170                     session.imported_failedcells,
     170                    session.importer_failedcells,
    171171                    correctedcells)
    172172
     
    290290        }
    291291
    292         //import workbook and store it in a session
    293         session.importer_importeddata = ImporterService.importData(session.importer_template_id, session.importer_workbook, session.importer_sheetindex, session.importer_datamatrix_start, session.importer_header)
    294 
    295         // First handle the "failed cells"
    296         session.imported_failedcells = ImporterService.getFailedCells(session.importer_importeddata)
    297 
    298         //render(view:"step2a_simple", model:[failedcells:session.imported_failedcells])
    299 
    300         if (params.layout=="horizontal")
     292        // Import the workbook and store the table with entity records and store the failed cells
     293        def (table, failedcells) = ImporterService.importData(session.importer_template_id, session.importer_workbook, session.importer_sheetindex, session.importer_datamatrix_start, session.importer_header)
     294
     295        session.importer_importeddata = table       
     296        session.importer_failedcells = failedcells
     297
     298        render(view:"step2a_simple", model:[failedcells:session.importer_failedcells])
     299
     300        /*if (params.layout=="horizontal")
    301301            render(view:"step3_simple", model:[datamatrix:session.importer_importeddata])
    302302        else if (params.layout=="vertical")
    303             render(view:"step3", model:[datamatrix:session.importer_importeddata])
     303            render(view:"step3", model:[datamatrix:session.importer_importeddata])*/
    304304    }
    305305
Note: See TracChangeset for help on using the changeset viewer.