Ignore:
Timestamp:
May 31, 2010, 4:48:53 PM (14 years ago)
Author:
gav
Message:

Get Inventory Search filterpane associatedPropertyValues in controller instead of in gsp.

File:
1 edited

Legend:

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

    r507 r554  
    235235        filterParams.order = params.order ?: "asc"
    236236
     237        // Get some associatedProperty values for filterpane.
     238        def associatedPropertyValues = [:]
     239        def associatedPropertyMax = 10000
     240        associatedPropertyValues.inventoryLocationList = InventoryLocation.findAllByIsActive(true, [max:associatedPropertyMax, sort:'name'])
     241        associatedPropertyValues.assetList = Asset.findAllByIsActive(true, [max:associatedPropertyMax, sort:'name'])
     242        associatedPropertyValues.manufacturerList = Manufacturer.findAllByIsActive(true, [max:associatedPropertyMax, sort:'name'])
     243        associatedPropertyValues.supplierList = Supplier.findAllByIsActive(true, [max:associatedPropertyMax, sort:'name'])
     244
    237245        return[ inventoryItemInstanceList: inventoryItemInstanceList,
    238                 inventoryItemInstanceTotal: inventoryItemInstanceTotal,
    239                 filterParams: filterParams,
    240                 params: params ]
     246                        inventoryItemInstanceTotal: inventoryItemInstanceTotal,
     247                        filterParams: filterParams,
     248                        params: params,
     249                        associatedPropertyValues: associatedPropertyValues ]
    241250    } // end search()
    242251
Note: See TracChangeset for help on using the changeset viewer.