Changeset 1270
- Timestamp:
- Dec 15, 2010, 1:32:02 PM (10 years ago)
- Location:
- trunk/grails-app
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/controllers/dbnp/studycapturing/TemplateController.groovy
r1269 r1270 79 79 templates << templateData 80 80 } catch (Exception e) { 81 templates << [ template: null, error: "Template " + ( template.name ?: " without name" ) + " could not be parsed "];81 templates << [ template: null, error: "Template " + ( template.name ?: " without name" ) + " could not be parsed: " + e ]; 82 82 } 83 83 } -
trunk/grails-app/domain/dbnp/studycapturing/TemplateField.groovy
r1257 r1270 474 474 // Search for list entries 475 475 xmlObject.listItems?.listItem.each { 476 t.addToListEntries( new TemplateFieldListItem( name: it.name?.text() ) ); 476 def name = "" 477 if( it.name ) 478 name = it.name.text() 479 480 t.addToListEntries( new TemplateFieldListItem( name: name ) ); 477 481 } 478 482 return t; -
trunk/grails-app/views/template/xml.gsp
r1269 r1270 35 35 <g:each in="${field.listEntries}" var="listEntry"> 36 36 <listItem> 37 < name><g:if test="${listEntry}">${listEntry.name?.encodeAsSimpleXML()}</g:if></name>37 <g:if test="${listEntry}"><name>${listEntry.name?.encodeAsSimpleXML()}</name></g:if> 38 38 </listItem> 39 39 </g:each>
Note: See TracChangeset
for help on using the changeset viewer.