- Timestamp:
- Feb 16, 2010, 9:57:56 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/controllers/AssetSubItemDetailedController.groovy
r352 r359 15 15 def index = { redirect(action:search,params:params) } 16 16 17 /** 18 * Set session.assetSubItemSearchParamsMax 19 */ 20 @Secured(['ROLE_AppAdmin', 'ROLE_Manager', 'ROLE_AssetManager', 'ROLE_AssetUser']) 21 def setSearchParamsMax = { 22 def max = 1000 23 if(params.newMax.isInteger()) { 24 def i = params.newMax.toInteger() 25 if(i > 0 && i <= max) 26 session.assetSubItemSearchParamsMax = params.newMax 27 if(i > max) 28 session.assetSubItemSearchParamsMax = max 29 } 30 forward(action: 'search', params: params) 31 } 32 17 33 @Secured(['ROLE_AppAdmin', 'ROLE_Manager', 'ROLE_AssetManager', 'ROLE_AssetUser']) 18 34 def search = { 19 35 20 if(session.assetS earchParamsMax)21 params.max = session.assetS earchParamsMax36 if(session.assetSubItemSearchParamsMax) 37 params.max = session.assetSubItemSearchParamsMax 22 38 23 39 params.max = Math.min( params.max ? params.max.toInteger() : 10, 1000)
Note: See TracChangeset
for help on using the changeset viewer.