Ignore:
Timestamp:
Feb 15, 2011, 3:05:23 PM (10 years ago)
Author:
robert@…
Message:

Refactored some of the querying stuff and built in 'check all' checkboxes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/controllers/dbnp/query/AdvancedQueryController.groovy

    r1512 r1524  
    153153                }
    154154
    155                 // Determine the possible actions
     155                // Determine the possible actions and build correct urls
    156156                def actions = determineActions(s, selectedIds );
    157157
     
    478478
    479479                // First check whether a search with the same criteria is already present
    480                 def previousSearch = retrieveSearchByCriteria( s.getCriteria() );
     480                def previousSearch = retrieveSearchByCriteria( s.getCriteria(), s.searchMode );
    481481
    482482                def id
     
    499499         * @return                      Search that has this criteria, or null if no such search is found.
    500500         */
    501         protected Search retrieveSearchByCriteria( List criteria ) {
     501        protected Search retrieveSearchByCriteria( List criteria, SearchMode searchMode = SearchMode.and ) {
    502502                if( !session.queries )
    503503                        return null
     
    510510                        def value = query.value;
    511511
    512                         if( value.criteria && value.criteria.containsAll( criteria ) && criteria.containsAll( value.criteria ) ) {
     512                        if( value.searchMode == searchMode && value.criteria && value.criteria.containsAll( criteria ) && criteria.containsAll( value.criteria ) ) {
    513513                                return value;
    514514                        }
Note: See TracChangeset for help on using the changeset viewer.