Changeset 5148


Ignore:
Timestamp:
Oct 20, 2009, 2:35:27 PM (12 years ago)
Author:
Martin Svensson
Message:

Fixes #1410 Sort problem in EExplorer when Avg

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/clients/web/net/sf/basedb/clients/web/ExperimentExplorer.java

    r5147 r5148  
    877877        {
    878878          // Find TableColumn to know which average method to use
    879           boolean found = false;
    880           for (TableColumn tc : selectionList)
     879          if (!sortProperty.startsWith("%"))
    881880          {
    882             if (sortProperty.equals(tc.getProperty()))
     881            boolean found = false;         
     882            for (TableColumn tc : selectionList)
    883883            {
    884               sortby = tc.getAverageMethod().getAverageExpression(sortby);
    885               found = true;
    886               break;
     884              if (sortProperty.equals(tc.getProperty()))
     885              {
     886                sortby = tc.getAverageMethod().getAverageExpression(sortby);
     887                found = true;
     888                break;
     889              }
    887890            }
     891            if (!found) sortby = null;
     892          }       
     893          else
     894          {
     895            sortby = avgMethod.getAverageExpression(sortby);
    888896          }
    889           if (!found) sortby = null;
    890897        }
    891898        if (sortby != null)
Note: See TracChangeset for help on using the changeset viewer.