changeset 7763:4d74d09228f0

Replaced hard coded rivers with rivers loaded from module service.
author Raimund Renkert <rrenkert@intevation.de>
date Thu, 27 Feb 2014 16:41:47 +0100
parents 2a97d9c3413a
children 5d17e0012020
files gwt-client/src/main/java/org/dive4elements/river/client/client/ui/ModuleSelection.java
diffstat 1 files changed, 10 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/ModuleSelection.java	Thu Feb 27 16:40:33 2014 +0100
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/ModuleSelection.java	Thu Feb 27 16:41:47 2014 +0100
@@ -73,26 +73,7 @@
         rivers = null;
         //TODO: put all the rivers into a config file, or something.
         fixRivers = new ArrayList<String>();
-        fixRivers.add("Rhein");
-        fixRivers.add("Elbe");
-        fixRivers.add("Donau");
-        fixRivers.add("Fulda (Sommer)");
-        fixRivers.add("Havel");
-        fixRivers.add("Lahn");
-        fixRivers.add("Main");
-        fixRivers.add("Mosel");
-        fixRivers.add("Neckar");
-        fixRivers.add("Oder");
-        fixRivers.add("Saale");
-        fixRivers.add("Saar");
-        fixRivers.add("Saar (Wiltinger Bogen)");
-        fixRivers.add("Werra (Sommer)");
-        fixRivers.add("Weser");
-
         minfoRivers = new ArrayList<String>();
-        minfoRivers.add("Elbe");
-        minfoRivers.add("Rhein");
-        minfoRivers.add("Oder");
 
         readModules();
     }
@@ -152,7 +133,16 @@
                     GWT.log("Module " + module.getName() + " is selected.");
                     if (radio != null) {
                         radio.setDefaultValue(module.getName());
-                        GWT.log("Setting " + module.getName() + " as selected.");
+                    }
+                }
+                if (module.getName().equals("fixanalysis")) {
+                    for (String river: module.getRivers()) {
+                        fixRivers.add(river);
+                    }
+                }
+                if (module.getName().equals("minfo")) {
+                    for (String river: module.getRivers()) {
+                        minfoRivers.add(river);
                     }
                 }
             }
@@ -242,7 +232,6 @@
     }-*/;
 
     private static String getSelectedModule() {
-        GWT.log("selected: " + radio.getValueAsString());
         return radio.getValueAsString();
     }
 }

http://dive4elements.wald.intevation.org