Ignore:
Timestamp:
Jun 29, 2011, 4:55:11 PM (13 years ago)
Author:
gav
Message:

Add filterpane search to CostCode? list view, part 2.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/controllers/CostCodeDetailedController.groovy

    r953 r954  
    1313    def list = {
    1414        params.max = Math.min( params.max ? params.max.toInteger() : 10,  100)
     15        def associatedPropertyMax = 1000
     16        def associatedPropertyValues = [:]
     17        def purchasingGroupNameQuery = 'select distinct a.name from PurchasingGroup a where a.isActive = ? order by a.name'
     18        associatedPropertyValues.purchasingGroupList = PurchasingGroup.executeQuery(purchasingGroupNameQuery, [true], [max:associatedPropertyMax])
    1519
    1620        if(!params.filter) {
    1721            return [costCodeInstanceList: CostCode.list(params),
    1822                    costCodeInstanceTotal: CostCode.count(),
     23                    associatedPropertyValues: associatedPropertyValues,
    1924                    filterParams: params]
    2025        }
     
    2328        return[ costCodeInstanceList: filterService.filter( params, CostCode ),
    2429                costCodeInstanceTotal: filterService.count( params, CostCode ),
     30                associatedPropertyValues: associatedPropertyValues,
    2531                filterParams: com.zeddware.grails.plugins.filterpane.FilterUtils.extractFilterParams(params),
    2632                params:params ]
Note: See TracChangeset for help on using the changeset viewer.