Ignore:
Timestamp:
Jan 12, 2010, 2:33:28 PM (15 years ago)
Author:
gav
Message:

Complete options div and max task results per page feature.

File:
1 edited

Legend:

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

    r260 r262  
    2323
    2424    def setTaskSearchParamsMax = {
    25         if(params.newMax.isInteger())
     25        def max = 1000
     26        if(params.newMax.isInteger()) {
    2627            def i = params.newMax.toInteger()
    27             if(params.newMax.toInteger() > 0)
    28         session.taskSearchParamsMax = params.newMax
    29         params.max = params.newMax
     28            if(i > 0 && i <= max)
     29                session.taskSearchParamsMax = params.newMax
     30            if(i > max)
     31                session.taskSearchParamsMax = max
     32        }
    3033        forward(action: 'search', params: params)
    3134    }
     
    3740
    3841        // TaskSearchService protects itself but filterPane does not.
    39         params.max = Math.min( params.max ? params.max.toInteger() : 10,  99999 )
     42        params.max = Math.min( params.max ? params.max.toInteger() : 10,  1000 )
    4043
    4144        def taskInstanceList = []
Note: See TracChangeset for help on using the changeset viewer.