- Timestamp:
- Feb 17, 2011, 4:52:50 PM (10 years ago)
- Location:
- trunk/grails-app
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/controllers/dbnp/importer/ImporterController.groovy
r1531 r1536 112 112 113 113 on("refresh") { 114 flash.importer_params = params 114 println params.importfile 115 116 if (params.entity) { 117 flash.importer_datatemplates = Template.findAllByEntity(GdtService.getInstanceByEntity(params.entity.decodeURL())) 118 } 119 120 flash.importer_params = params 121 115 122 success() 116 123 }.to "pageOne" … … 118 125 on("next") { 119 126 flash.wizardErrors = [:] 120 //flash.importer_params = params 127 flash.importer_params = params 128 129 if (params.entity) { 130 flash.importer_datatemplates = Template.findAllByEntity(GdtService.getInstanceByEntity(params.entity.decodeURL())) 131 } 121 132 122 133 // Study selected? … … 145 156 onRender { 146 157 log.info ".import wizard properties page" 158 159 def template = Template.get(flow.importer_template_id) 160 147 161 // Grom a development message 148 162 if (pluginManager.getGrailsPlugin('grom')) ".rendering the partial: pages/_page_two.gsp".grom() 149 163 150 flow.importer_importmappings = ImportMapping. list()164 flow.importer_importmappings = ImportMapping.findAllByTemplate(template) 151 165 152 166 flow.page = 2 … … 154 168 } 155 169 on("refresh") { 156 flow.importer_importmappings = ImportMapping.list() 170 def template = Template.get(flow.importer_template_id) 171 flow.importer_importmappings = ImportMapping.findAllByTemplate(template) 157 172 158 173 // a name was given to the current property mapping, try to store it … … 164 179 propertiesLoadImportMappingPage(flow, flash, params) 165 180 } 166 167 168 181 169 182 if (params.fuzzymatching == "true") … … 453 466 } catch (Exception e) { 454 467 //getNextException 455 log.error "importer wizard save error: " + e 456 log.error "importer wizard nextexception: " + e.getNextException() 468 log.error "importer wizard save importmapping error: " + e 457 469 } 458 470 } … … 466 478 } 467 479 468 /*def importmappings = { 469 470 ImportMapping.list().each { importmapping -> 471 importmapping.mappingcolumns.each { mappingcolumn -> 472 println "das"+mappingcolumn.dump() 473 474 } 475 } 476 477 render("leeg") 478 }*/ 479 480 /** 480 /** 481 481 * Handle the property mapping page. 482 482 * -
trunk/grails-app/services/dbnp/importer/ImporterService.groovy
r1527 r1536 441 441 } 442 442 443 try { 444 println "importdata="+mc.entityclass 443 try { 445 444 // which entity does the current cell (field) belong to? 446 445 switch (mc.entityclass) { -
trunk/grails-app/views/importer/pages/_page_one.gsp
r1500 r1536 82 82 </td> 83 83 <td> 84 <g:select rel="template" entity="none" name="template_id" optionKey="id" optionValue="name" from=" []" value="${importer_params?.template_id}"/>84 <g:select rel="template" entity="none" name="template_id" optionKey="id" optionValue="name" from="${importer_datatemplates}" value="${importer_params?.template_id}"/> 85 85 </td> 86 86 </tr>
Note: See TracChangeset
for help on using the changeset viewer.