changeset 1514:b6af10d5f3da

Partial flys/issue441. flys-client/trunk@3663 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Thu, 12 Jan 2012 12:33:25 +0000
parents f43862cc1e6e
children 298a4ce64c2e
files flys-client/ChangeLog flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ChartThemePanel.java
diffstat 2 files changed, 19 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/flys-client/ChangeLog	Thu Jan 12 10:46:44 2012 +0000
+++ b/flys-client/ChangeLog	Thu Jan 12 12:33:25 2012 +0000
@@ -1,3 +1,11 @@
+2012-01-12  Felix Wolfsteller <felix.wolfsteller@intevation.de>
+
+	Partial flys/issue441 (Fläche über HSQ (zweite Achse) verkehrt). 
+
+	* src/main/java/de/intevation/flys/client/client/ui/chart/ChartThemePanel.java:
+	  Adjust data content to what is expected on server side (to allow
+	  unique identification of facets).
+
 2012-01-12  Raimund Renkert <raimund.renkert@intevation.de>
 
 	* src/main/java/de/intevation/flys/client/shared/model/MapArtifact.java:
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ChartThemePanel.java	Thu Jan 12 10:46:44 2012 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ChartThemePanel.java	Thu Jan 12 12:33:25 2012 +0000
@@ -80,6 +80,7 @@
     }
 
 
+    /** Creates Layout with theme list and navigation bar inside. */
     protected VLayout createLayout() {
         VLayout layout = new VLayout();
         layout.setWidth100();
@@ -141,6 +142,11 @@
         return "longitudinal_section.area";
     }
 
+    public static String areaKey(Theme theme) {
+        return theme.getArtifact() + ":" + theme.getFacet() + ":"
+            + theme.getIndex();
+    }
+
 
     /**
      * Tell an area artifact where to get the upper and lower curve from.
@@ -158,9 +164,9 @@
         if (over != null && under != null) {
             feedData = new Data[] {
                 DefaultData.createSimpleStringData("area.curve_under",
-                    under.getArtifact() + under.getIndex()),
+                    areaKey(under)),
                 DefaultData.createSimpleStringData("area.curve_over",
-                    over.getArtifact() + over.getIndex()),
+                    areaKey(over)),
                 DefaultData.createSimpleStringData("area.name",
                     over.getDescription() + " / " + under.getDescription()),
                 DefaultData.createSimpleStringData("area.facet",
@@ -173,7 +179,7 @@
         else if (over == null && under != null) {
             feedData = new Data[] {
                 DefaultData.createSimpleStringData("area.curve_under",
-                    under.getArtifact() + under.getIndex()),
+                    areaKey(under)),
                 DefaultData.createSimpleStringData("area.name",
                     under.getDescription() + " / " + MSG.getString("x_axis")),
                 DefaultData.createSimpleStringData("area.facet",
@@ -186,7 +192,7 @@
         else if (over != null && under == null) {
             feedData = new Data[] {
                 DefaultData.createSimpleStringData("area.curve_over",
-                    over.getArtifact() + over.getIndex()),
+                    areaKey(over)),
                 DefaultData.createSimpleStringData("area.name",
                     MSG.getString("x_axis") + " / " + over.getDescription()),
                 DefaultData.createSimpleStringData("area.facet",
@@ -213,7 +219,7 @@
                     SC.warn(MSG.getString(caught.getMessage()));
                     enable();
                 }
-                public void onSuccess(Artifact artifact) {
+                public void onSuccess(Artifact fartifact) {
                     GWT.log("Successfully set area params to " + artifact);
                     requestRedraw();
                     updateCollection();

http://dive4elements.wald.intevation.org