Changeset 69


Ignore:
Timestamp:
Jun 14, 2011, 5:12:49 PM (8 years ago)
Author:
robert@…
Message:
  • Solved a bug in selecting rows in a paginated table
  • Removed debug printlns
Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/services/nl/tno/massSequencing/DataTablesService.groovy

    r60 r69  
    9292                def retrieveHQL = [ selectHQL, fromHQL, whereHQL, groupHQL, orderHQL ].join( " " );
    9393               
    94                 println "HQL: " + retrieveHQL;
    95                 println "ORDER " + params.int( 'iSortCol_0' );
    96                
    9794                def data = domainClass.executeQuery( retrieveHQL, queryParameters, [ max: num, offset: start ])
    9895               
  • trunk/web-app/js/paginate.js

    r63 r69  
    206206                elementsSelected[ tableId ] = new Array();
    207207        } else {
    208                 // Otherwise, select everything
    209                 elementsSelected[ tableId ] = allElements[ tableId ]
     208                // Otherwise, select everything. We make a copy of the allElements list, because we
     209                // need to copy by value
     210                elementsSelected[ tableId ] = new Array();
     211                $.each( allElements[ tableId ] , function( idx, value ) {
     212                        elementsSelected[ tableId ][ elementsSelected[ tableId ].length ] = value;
     213                });
    210214        }
    211215       
Note: See TracChangeset for help on using the changeset viewer.