[PATCH 4 of 4] issue1394: Let client use the new pseudo-out: differenceable, deal with

Wald Commits scm-commit at wald.intevation.org
Wed Jul 17 12:09:03 CEST 2013


# HG changeset patch
# User Felix Wolfsteller <felix.wolfsteller at intevation.de>
# Date 1374056308 -7200
# Node ID 3059d49cc5ce75491b683855752ec0c308a623c9
# Parent  e7e5b40cccc3080428279e6b06a645f8ca6593a6
issue1394: Let client use the new pseudo-out: differenceable, deal with
artifacts of other types for diffs. Minor refac.

diff -r e7e5b40cccc3 -r 3059d49cc5ce gwt-client/src/main/java/org/dive4elements/river/client/client/ui/DatacageTwinPanel.java
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/DatacageTwinPanel.java	Wed Jul 17 12:16:47 2013 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/DatacageTwinPanel.java	Wed Jul 17 12:18:28 2013 +0200
@@ -175,7 +175,7 @@
         VLayout layout       = new VLayout();
         HLayout helperLayout = new HLayout();
         helperLayout.addMember(new DatacagePairWidget(this.artifact,
-            user, "waterlevels", differencesList));
+            user, "differenceable", differencesList));
 
         layout.addMember(widget);
         layout.addMember(submit);
@@ -277,6 +277,21 @@
         this.removedPairs.add(pr);
     }
 
+    public void adjustRecommendation(Recommendation recommendation) {
+        if (recommendation.getIDs() != null) {
+            GWT.log("Setting staticwkms factory for rec with ID "
+                + recommendation.getID());
+            recommendation.setFactory("staticwkms");
+        }
+        else if (recommendation.getFactory().equals("winfo")) {
+            GWT.log("Setting waterlevel factory for a winfo rec.");
+            recommendation.setFactory("waterlevel");
+        }
+        else {
+           GWT.log("Leave rec. id " + recommendation.getID() + ", factory "
+               + recommendation.getFactory() + " untouched.");
+        }
+    }
 
     /**
      * Validates data, does nothing if invalid, otherwise clones new selected


More information about the Dive4elements-commits mailing list