Ignore:
Timestamp:
Dec 16, 2010, 3:42:15 PM (10 years ago)
Author:
t.w.abma@…
Message:
  • rewrite of the Importer Wizard into an Ajaxflow
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/taglib/dbnp/importer/ImporterTagLib.groovy

    r1202 r1277  
    6969     */
    7070    def failedCells = { attrs ->
    71         def failedcells = attrs['failedcells']
    72         out << render (template:"common/failedcells", model:[failedcells:failedcells])
     71        def failedcells = attrs['failedcells']
     72        out << render (template:"common/failedcells", model:[failedcells:failedcells])
    7373    }
    7474
     
    7676     * @param entities array containing selected entities
    7777     * @param header array containing mappingcolumn objects
    78      * @param allfieldtypes if set, show all fields
    79      * @param layout constant value: "horizontal" or "vertical"
     78     * @param allfieldtypes if set, show all fields   
    8079     */
    8180    def properties = { attrs ->
    8281        def header = attrs['header']
    8382        def entities = attrs['entities']
    84         def allfieldtypes = (attrs['allfieldtypes']==null) ? "false" : "true"
    85         def layout = (attrs['layout']==null) ? "vertical" : attrs['layout']
    86 
    87         //choose template for vertical layout (default) or horizontal layout
    88         def template = (layout == "vertical") ? "common/properties_vertical" : "common/properties_horizontal"
    89        
    90         out << render ( template:template,
    91                         model:[selectedentities:entities,
    92                         standardentities:grailsApplication.config.gscf.domain.importableEntities,
    93                         header:header,
    94                         allfieldtypes:allfieldtypes,
    95                         layout:layout]
    96                         )
     83
     84        out << render ( template:"common/properties_horizontal" )
    9785    }
    9886
     
    11098        // TODO: this should be changed to retrieving fields per entity instead of from one template
    11199        //       and session variables should not be used inside the service, migrate to controller
    112 
    113         def t = Template.get(session.importer_template_id)
     100   
     101        def t = Template.get(attrs['template_id'])
    114102        def mc = attrs['mappingcolumn']
    115103        def allfieldtypes = attrs['allfieldtypes']
    116         def matchvalue = attrs['matchvalue']
     104    def matchvalue = attrs['matchvalue']
    117105        def domainfields = mc.entity.giveDomainFields().findAll { it.type == mc.templatefieldtype }
    118106            domainfields = domainfields.findAll { it.preferredIdentifier != mc.identifier}
Note: See TracChangeset for help on using the changeset viewer.