- Timestamp:
- Jan 24, 2012, 5:30:45 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/controllers/generic/AjaxController.groovy
r2149 r2150 92 92 93 93 def studyCount = { 94 def result = [0:"0 studies found based on your criteria"]; 94 println params 95 println params.containsKey('data') 96 // println params['data']['uniqueSpecies'] 97 98 def matched = false 99 def user = authenticationService.getLoggedInUser() 100 def studies = Study.giveReadableStudies(user) 101 def matchedStudies = [] 102 103 // parameters 104 /* 105 def uniqueSpecies = (params['data']['uniqueSpecies']) ? params['data']['uniqueSpecies'] : [] 106 println uniqueSpecies.class 107 println uniqueSpecies.size() 108 109 // iterate through studies 110 studies.each { study -> 111 matched = false 112 // matched = (study.subjects.find{uniqueSpecies.contains(it.species.id)}) ? true : false; 113 println "study: ${study} -> matched: ${matched}" 114 115 if (matched) matchedStudies.add(study) 116 } 117 */ 118 println "------" 119 120 def result = ['count':matchedStudies.size()]; 95 121 96 122 // set output header to json
Note: See TracChangeset
for help on using the changeset viewer.