Ignore:
Timestamp:
May 4, 2010, 5:03:21 PM (11 years ago)
Author:
keesvb
Message:

switched back from the fancy 'integrate domain fields as system fields directly into the Template object at the time of creation' method to the plain 'implement getFieldValue, setFieldValue and giveFields to work for both domain and template fields'. NB: this might affect Events, since until now startTime and endTime were moved directly into template! Switch any Event.template.fields to Event.giveFields()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/domain/dbnp/studycapturing/Template.groovy

    r384 r392  
    2323                // see http://jira.codehaus.org/browse/GRAILS-6020
    2424                //      name(unique:['entity'])
    25         }
    26 
    27         // As the entity is not known at the time the constructor is called,
    28         // we add the system fields for a new template object at the time the entity is set
    29         void setEntity(Class value) {
    30                 this.entity = value
    31                 if (value != null) {
    32                         if (fields == null) {
    33                                 if (entity.systemFields) {
    34                                         println "adding default template fields for " + entity.systemFields
    35                                         entity.systemFields.each {
    36                                                 this.addToFields(it)
    37                                         }
    38                                 }
    39                         }
    40                         println "" + value + "this template has now fields " + fields
    41                 }
    42 
    4325        }
    4426
Note: See TracChangeset for help on using the changeset viewer.