Changeset 1277 for trunk/grails-app/taglib
- Timestamp:
- Dec 16, 2010, 3:42:15 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/taglib/dbnp/importer/ImporterTagLib.groovy
r1202 r1277 69 69 */ 70 70 def failedCells = { attrs -> 71 72 71 def failedcells = attrs['failedcells'] 72 out << render (template:"common/failedcells", model:[failedcells:failedcells]) 73 73 } 74 74 … … 76 76 * @param entities array containing selected entities 77 77 * @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 80 79 */ 81 80 def properties = { attrs -> 82 81 def header = attrs['header'] 83 82 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" ) 97 85 } 98 86 … … 110 98 // TODO: this should be changed to retrieving fields per entity instead of from one template 111 99 // 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']) 114 102 def mc = attrs['mappingcolumn'] 115 103 def allfieldtypes = attrs['allfieldtypes'] 116 104 def matchvalue = attrs['matchvalue'] 117 105 def domainfields = mc.entity.giveDomainFields().findAll { it.type == mc.templatefieldtype } 118 106 domainfields = domainfields.findAll { it.preferredIdentifier != mc.identifier}
Note: See TracChangeset
for help on using the changeset viewer.