From faa99c4795d4db808a47641a6e57a0b7d071dc75 Mon Sep 17 00:00:00 2001
From: tpylak <tpylak>
Date: Wed, 28 Oct 2009 14:04:07 +0000
Subject: [PATCH] LMS-1073 reset auto-filters when criterias are changed

SVN: 13113
---
 .../web/client/application/ui/grid/AbstractBrowserGrid.java     | 2 +-
 .../web/client/application/ui/grid/ListColumnFilterWidget.java  | 2 +-
 .../application/ui/grid/expressions/filter/FilterToolbar.java   | 1 +
 3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/AbstractBrowserGrid.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/AbstractBrowserGrid.java
index aa1a2b0c22a..3861263518d 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/AbstractBrowserGrid.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/AbstractBrowserGrid.java
@@ -871,9 +871,9 @@ public abstract class AbstractBrowserGrid<T/* Entity */, M extends BaseEntityMod
                 {
                     pagingToolbar.disableExportButton();
                     pagingToolbar.updateDefaultConfigButton(false);
+                    filterToolbar.refresh();
                     // export and config buttons are enabled when ListEntitiesCallback is complete
                     refresh();
-                    filterToolbar.refresh();
                 }
             };
     }
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/ListColumnFilterWidget.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/ListColumnFilterWidget.java
index 3a494b7263c..8cb8bac5ca0 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/ListColumnFilterWidget.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/ListColumnFilterWidget.java
@@ -52,7 +52,7 @@ public class ListColumnFilterWidget<T> extends ComboBox<ModelData> implements
 
     private final static String MODEL_VALUE_KEY = "value";
 
-    private static final String EMPTY_VALUE = "-- empty --";
+    private static final String EMPTY_VALUE = "(empty)";
 
     private final IColumnDefinition<T> filteredField;
 
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/expressions/filter/FilterToolbar.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/expressions/filter/FilterToolbar.java
index 3b113c13044..13b9c8bd1da 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/expressions/filter/FilterToolbar.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/expressions/filter/FilterToolbar.java
@@ -331,6 +331,7 @@ public class FilterToolbar<T> extends ToolBar implements IDatabaseModificationOb
     public void refresh()
     {
         filterSelectionWidget.refreshStore();
+        resetFilterFields();
     }
 
     // ------------------------------------
-- 
GitLab