Changeset 956 for trunk/grails-app/controllers/PersonController.groovy
- Timestamp:
- Jun 30, 2011, 7:04:14 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/controllers/PersonController.groovy
r724 r956 53 53 def list = { 54 54 params.max = Math.min( params.max ? params.max.toInteger() : 10, 100 ) 55 def associatedPropertyMax = 1000 56 def associatedPropertyValues = [:] 57 def personGroupNameQuery = 'select distinct a.name from PersonGroup a where a.isActive = ? order by a.name' 58 associatedPropertyValues.personGroupList = PersonGroup.executeQuery(personGroupNameQuery, [true], [max:associatedPropertyMax]) 59 60 def authorityQuery = 'select a.authority from Authority a' 61 associatedPropertyValues.authorityList = Authority.executeQuery(authorityQuery, [max:associatedPropertyMax]) 55 62 56 63 if(!params.filter) { 57 64 return [personList: Person.list(params), 58 personTotal: Person.count(), 59 filterParams: params] 65 personTotal: Person.count(), 66 associatedPropertyValues: associatedPropertyValues, 67 filterParams: params] 60 68 } 61 69 62 70 // filterPane: 63 71 return[ personList: filterService.filter( params, Person ), 64 personTotal: filterService.count( params, Person ), 65 filterParams: com.zeddware.grails.plugins.filterpane.FilterUtils.extractFilterParams(params), 66 params:params ] 72 personTotal: filterService.count( params, Person ), 73 associatedPropertyValues: associatedPropertyValues, 74 filterParams: com.zeddware.grails.plugins.filterpane.FilterUtils.extractFilterParams(params), 75 params:params ] 67 76 } 68 77
Note: See TracChangeset
for help on using the changeset viewer.