Changeset 2054
- Timestamp:
- Oct 10, 2011, 12:01:51 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/controllers/dbnp/visualization/VisualizeController.groovy
r2047 r2054 230 230 if( type == "domainfields" ) 231 231 collection = domainObjectCallback( category )?.giveDomainFields(); 232 else 232 else 233 233 collection = templateObjectCallback( category, study )?.template?.fields 234 234 … … 237 237 // Formatting the data 238 238 fields += formatGSCFFields(type, collection, source, category) 239 240 // Here we will remove those fields, whose set of datapoints only contain null 241 def fieldsToBeRemoved = [] 242 fields.each{ field -> 243 def fieldData = getFieldData( study, study.samples, field.id ) 244 fieldData.removeAll([null]) 245 if(fieldData==[]){ 246 // Field only contained nulls, so don't show it as a visualization option 247 fieldsToBeRemoved << field 248 } 249 } 250 fields.removeAll(fieldsToBeRemoved) 239 251 240 252 return fields
Note: See TracChangeset
for help on using the changeset viewer.