Ignore:
Timestamp:
Apr 22, 2010, 9:31:50 AM (9 years ago)
Author:
roberth
Message:

Updated studies list to handle the new data model.
Updated the bootstrap to contain some studies with attached events and persons in order to test the updated studies list
Added fieldExists method to TemplateEntity? to check whether a given field exists or not

File:
1 edited

Legend:

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

    r359 r370  
    263263
    264264        /**
     265         * Check whether a given template field exists or not
     266         * @param fieldName The name of the template field
     267         * @return true if the given field exists and false otherwise
     268         */
     269        def fieldExists(String fieldName) {
     270                TemplateFieldType fieldType = template.getFieldType(fieldName)
     271
     272                // If the field is found, a TemplateFieldType is returned
     273                // otherwise null
     274                if (fieldType) {
     275                    return true
     276                } else {
     277                    return false
     278                }
     279        }
     280
     281        /**
    265282         * Set a template/entity field value
    266283         * @param fieldName The name of the template or entity field
Note: See TracChangeset for help on using the changeset viewer.