diff flys-client/src/main/java/de/intevation/flys/client/client/ui/map/GetFeatureInfo.java @ 5813:e0ab5a566688

Rework FeatureInfo Window fopr issue 775 Looks much better now :)
author Andre Heinecke <aheinecke@intevation.de>
date Wed, 24 Apr 2013 14:58:14 +0200
parents af2aa716152f
children a4ff4167be1e
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/map/GetFeatureInfo.java	Wed Apr 24 14:51:55 2013 +0200
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/map/GetFeatureInfo.java	Wed Apr 24 14:58:14 2013 +0200
@@ -20,6 +20,7 @@
 import de.intevation.flys.client.client.services.GFIServiceAsync;
 import de.intevation.flys.client.shared.model.FacetRecord;
 import de.intevation.flys.client.shared.model.Theme;
+import de.intevation.flys.client.shared.model.AttributedTheme;
 import de.intevation.flys.client.client.ui.ThemePanel;
 
 
@@ -59,12 +60,12 @@
     }
 
 
-    protected void newGetFeatureInfoWindow(List<FeatureInfo> features) {
+    protected void newGetFeatureInfoWindow(List<FeatureInfo> features, String title) {
         if (gfiWindow != null) {
             gfiWindow.destroy();
         }
 
-        gfiWindow = new GetFeatureInfoWindow(features);
+        gfiWindow = new GetFeatureInfoWindow(features, title);
         gfiWindow.show();
     }
 
@@ -80,6 +81,7 @@
 
         for (ListGridRecord rec : themePanel.getSelectedRecords()) {
             Theme act_theme = ((FacetRecord)rec).getTheme();
+            final AttributedTheme at = (AttributedTheme)act_theme;
             gfiService.query(
                 act_theme,
                 infoFormat,
@@ -97,7 +99,7 @@
                     @Override
                     public void onSuccess(List<FeatureInfo> features) {
                         if (features != null && !features.isEmpty())
-                            newGetFeatureInfoWindow(features);
+                            newGetFeatureInfoWindow(features, at.getAttr("description"));
                     }
                 }
             );

http://dive4elements.wald.intevation.org