Changeset 177


Ignore:
Timestamp:
Feb 8, 2010, 12:46:19 PM (13 years ago)
Author:
keesvb
Message:

added mouse genotype fields to bootstrap, replaced giveAllFields in Study to return template fields

Location:
trunk/grails-app
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/conf/BootStrap.groovy

    r175 r177  
    117117                                name: 'Mouse'
    118118                        ).addToSubjectFields(new TemplateSubjectField(
    119                                 name: 'Genotype',type: TemplateFieldType.STRINGLIST))
     119                                name: 'Genotype',type: TemplateFieldType.STRINGLIST,
     120                                listEntries: ['C57/Bl6j','wild type']))
    120121                        .addToSubjectFields(new TemplateSubjectField(
    121                                 name: 'Gender',type: TemplateFieldType.STRINGLIST, listEntries: ['Male','Female']))
     122                                name: 'Gender',type: TemplateFieldType.STRINGLIST,
     123                                listEntries: ['Male','Female']))
    122124                        .addToSubjectFields(new TemplateSubjectField(
    123125                                name: 'Age',type: TemplateFieldType.INTEGER))
  • trunk/grails-app/domain/dbnp/studycapturing/Study.groovy

    r176 r177  
    4646        }
    4747
    48         Map giveAllFields() {
    49                 def result = [:]
    50 
    51                 // Using reflection here gives way too many properties, like searchable, hasMany,
    52                 // and it will probably extend when we use new plugins
    53                 // It is probably best
    54                 // - to either hardcode the above given properties
    55                 // - or to move all fields to the template
    56                
    57                 this.properties.each{ //public fields only
    58                         println it.name
    59                         result[it.name] = it.type.name //name of field and name of type
    60                 }
    61 
    62                 return result;
     48        def giveAllFields() {
     49                return template.studyFields;
    6350        }
    6451}
Note: See TracChangeset for help on using the changeset viewer.