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

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

Location:
trunk/grails-app/controllers
Files:
2 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
  • trunk/grails-app/controllers/TaskDetailedController.groovy

    r553 r554  
    169169                        filterParams: filterParams,
    170170                        params: params,
    171                         associatedPropertyValues: associatedPropertyValues]
     171                        associatedPropertyValues: associatedPropertyValues ]
    172172
    173173    } // search
Note: See TracChangeset for help on using the changeset viewer.