From 1a8766bf8c80eabd72c10973c3bd608318562a50 Mon Sep 17 00:00:00 2001
From: pkupczyk <pkupczyk>
Date: Tue, 21 Aug 2012 09:08:31 +0000
Subject: [PATCH] SP-241 / BIS-122 : Embedded grids need to persist display
 settings - don't show the header when the text is not specified

SVN: 26409
---
 .../ui/aggregation/AggregationServicePanel.java      | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/aggregation/AggregationServicePanel.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/aggregation/AggregationServicePanel.java
index 040c06d0fd9..29fd9ab6bd8 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/aggregation/AggregationServicePanel.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/aggregation/AggregationServicePanel.java
@@ -77,10 +77,6 @@ public class AggregationServicePanel extends ContentPanel
         public void execute(final IDisposableComponent reportComponent)
         {
             layoutContainer.removeAll();
-            if (layoutContainer.getGridHeaderText() != null)
-            {
-                layoutContainer.setHeading(layoutContainer.getGridHeaderText());
-            }
             layoutContainer.add(reportComponent.getComponent());
             layoutContainer.layout();
         }
@@ -111,6 +107,14 @@ public class AggregationServicePanel extends ContentPanel
         gridSettingsId = viewLocator.getParameters().get(GRID_SETTINGS_ID_PARAM);
         gridHeaderText = viewLocator.getParameters().get(GRID_HEADER_TEXT_PARAM);
 
+        if (getGridHeaderText() != null)
+        {
+            setHeading(getGridHeaderText());
+        } else
+        {
+            setHeaderVisible(false);
+        }
+
         if (areRequiredParametersSpecified())
         {
             // All ivars must be initialized before the aggregation service is called
-- 
GitLab