Changeset 886


Ignore:
Timestamp:
Apr 15, 2011, 4:55:48 AM (8 years ago)
Author:
gav
Message:

Fix null pointer bug in TaskProcedure list view.
Does not appear affect Grails-1.2.2.

Location:
branches/features/grailsUpgrade/grails-app
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/features/grailsUpgrade/grails-app/controllers/TaskProcedureDetailedController.groovy

    r813 r886  
    1717        params.max = Math.min( params.max ? params.max.toInteger() : 10,  100)
    1818
    19         if(!params.filter)
    20         { return [taskProcedureInstanceList: TaskProcedure.list(params), taskProcedureInstanceTotal: TaskProcedure.count()] }
     19        def taskProcedureInstanceList
     20        def taskProcedureInstanceTotal
     21        def filterParams = com.zeddware.grails.plugins.filterpane.FilterUtils.extractFilterParams(params)
     22
     23        if(params.filter) {
     24            taskProcedureInstanceList = filterService.filter( params, TaskProcedure )
     25            taskProcedureInstanceTotal = filterService.count( params, TaskProcedure )
     26        }
     27        else {
     28            taskProcedureInstanceList = TaskProcedure.list(params)
     29            taskProcedureInstanceTotal = TaskProcedure.count()
     30        }
    2131
    2232        // filterPane:
    23         return[ taskProcedureInstanceList: filterService.filter( params, TaskProcedure ),
    24             taskProcedureInstanceTotal: filterService.count( params, TaskProcedure ),
    25             filterParams: com.zeddware.grails.plugins.filterpane.FilterUtils.extractFilterParams(params),
    26             params:params ]
     33        return[ taskProcedureInstanceList: taskProcedureInstanceList,
     34            taskProcedureInstanceTotal: taskProcedureInstanceTotal,
     35            filterParams: filterParams,
     36            params: params ]
    2737    }
    2838
  • branches/features/grailsUpgrade/grails-app/views/taskProcedureDetailed/list.gsp

    r809 r886  
    3636                            <tr>
    3737
    38                                 <g:sortableColumn property="id" title="Id"  params="${filterParams}" />
     38                                <g:sortableColumn property="id" title="Id" params="${filterParams}" />
    3939                                <th>Description</th>
    4040                                <th>Asset</th>
Note: See TracChangeset for help on using the changeset viewer.