[PATCH] little work on uinfo.inundationduration
Wald Commits
scm-commit at wald.intevation.org
Fri Jun 22 16:52:38 CEST 2018
# HG changeset patch
# User gernotbelger
# Date 1529679142 -7200
# Node ID 2ec9123453590bb466b62edb33c142623d39e822
# Parent 3ace6db2f87b6e0220cdfea58299c36b49334656
little work on uinfo.inundationduration
diff -r 3ace6db2f87b -r 2ec912345359 artifacts/doc/conf/artifacts/uinfo.xml
--- a/artifacts/doc/conf/artifacts/uinfo.xml Fri Jun 22 14:34:33 2018 +0200
+++ b/artifacts/doc/conf/artifacts/uinfo.xml Fri Jun 22 16:52:22 2018 +0200
@@ -132,7 +132,7 @@
<transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition">
<from state="state.uinfo.year_totalepoch" />
- <to state="state.uinfo.load.totalepoch" />
+ <to state="state.uinfo.inundation.use_scenario" />
<condition data="ye_select" value="state.uinfo.totalepoch" operator="equal" />
</transition>
@@ -145,17 +145,7 @@
<state id="state.uinfo.load.year" description="state.uinfo.load.year" state="org.dive4elements.river.artifacts.states.LoadSingleYearSelectState" helpText="help.state.uinfo.load.year">
<data name="singleyear" type="String" />
</state>
-
- <state id="state.uinfo.load.totalepoch" description="state.uinfo.load.totalepoch" state="org.dive4elements.river.artifacts.uinfo.inundationduration.LoadEpochSelect" helpText="help.state.uinfo.load.epoch">
- <data name="totalepoch" type="String" />
- </state>
-
-
- <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition">
- <from state="state.uinfo.load.totalepoch" />
- <to state="state.uinfo.inundation.use_scenario" />
- <condition data="calculation_mode" value="uinfo_inundation_duration" operator="equal" />
- </transition>
+
<transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition">
<from state="state.uinfo.load.year" />
diff -r 3ace6db2f87b -r 2ec912345359 artifacts/src/main/resources/messages.properties
--- a/artifacts/src/main/resources/messages.properties Fri Jun 22 14:34:33 2018 +0200
+++ b/artifacts/src/main/resources/messages.properties Fri Jun 22 16:52:22 2018 +0200
@@ -79,8 +79,7 @@
state.uinfo.year_totalepoch = Year/Gesamter Zeitraum
state.uinfo.year_epoch = Year/Epoch
-state.uinfo.load.year= Year
-state.uinfo.load.totalepoch=Gesamter Zeitraum
+state.uinfo.load.year= Year
state.uinfo.load.epoch=Epoch
state.uinfo.year=Year
state.uinfo.epoch=Epoch
@@ -863,8 +862,8 @@
state.sinfo.riverside = Auswahl der Uferseite
state.sinfo.riverside.option1 = Linke Uferseite
-state.sinfo.riverside.option1 = Rechte Uferseite
-state.sinfo.riverside.option1 = Beide Uferseiten
+state.sinfo.riverside.option2 = Rechte Uferseite
+state.sinfo.riverside.option3 = Beide Uferseiten
help.state.sinfo.wspl= ${help.url}/OnlineHilfe/SINFO#help.state.sinfo.riverside
state.sinfo.wqinput = Eingabe f\u00fcr W/Q Daten
diff -r 3ace6db2f87b -r 2ec912345359 artifacts/src/main/resources/messages_de.properties
--- a/artifacts/src/main/resources/messages_de.properties Fri Jun 22 14:34:33 2018 +0200
+++ b/artifacts/src/main/resources/messages_de.properties Fri Jun 22 16:52:22 2018 +0200
@@ -79,12 +79,11 @@
state.uinfo.year_totalepoch = Jahr/Gesamter Zeitraum
state.uinfo.year_epoch = Jahr/Epoche
-state.uinfo.load.year= Jahr
-state.uinfo.load.totalepoch=Gesamter Zeitraum
+state.uinfo.load.year= Jahr
state.uinfo.load.epoch=Epoche
-state.uinfo.year=Jahr
+state.uinfo.year=Einzeljahr
state.uinfo.epoch=Epoche
-state.uinfo.totalepoch=Gesamter Zeitraum
+state.uinfo.totalepoch=Langj\u00e4hriges Mittel
state.sinfo.year_epoch = Jahr/Epoche
state.sinfo.load.year= Jahr(e)
@@ -863,8 +862,8 @@
state.sinfo.riverside = Auswahl der Uferseite
state.sinfo.riverside.option1 = Linke Uferseite
-state.sinfo.riverside.option1 = Rechte Uferseite
-state.sinfo.riverside.option1 = Beide Uferseiten
+state.sinfo.riverside.option2 = Rechte Uferseite
+state.sinfo.riverside.option3 = Beide Uferseiten
help.state.sinfo.wspl= ${help.url}/OnlineHilfe/SINFO#help.state.sinfo.riverside
state.sinfo.wqinput = Eingabe f\u00fcr W/Q Daten
@@ -1062,7 +1061,7 @@
state.uinfo.scenario_type=Auswahl des Szenariotyps
scenarioType.option1 = Regional wirkende Eingriffe
scenarioType.option2 = \u00dcberregional wirkende Eingriffe
-scenarioType.option1 = Historische Betrachtung
+scenarioType.option3 = Historische Betrachtung
help.state.uinfo.scenario_type=${help.url}/OnlineHilfe/UINFO#help.state.uinfo.scenario_type
state.uinfo.distance_only_part = Teilabschnitt
diff -r 3ace6db2f87b -r 2ec912345359 gwt-client/src/main/java/org/dive4elements/river/client/client/ui/RadioPanel.java
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/RadioPanel.java Fri Jun 22 14:34:33 2018 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/RadioPanel.java Fri Jun 22 16:52:22 2018 +0200
@@ -9,6 +9,7 @@
package org.dive4elements.river.client.client.ui;
import java.util.LinkedHashMap;
+import java.util.Map;
import org.dive4elements.river.client.shared.model.Data;
import org.dive4elements.river.client.shared.model.DataItem;
@@ -30,6 +31,7 @@
protected String dataName;
protected DynamicForm form;
+ private final Map<String, String> valueLabelMap = new LinkedHashMap<String, String>();
@Override
public Canvas createOld(final DataList dataList) {
@@ -70,6 +72,7 @@
for (final DataItem item : items) {
GWT.log(item.getStringValue() + "; " + item.getLabel());
elems.put(item.getStringValue(), item.getLabel());
+ this.valueLabelMap.put(item.getStringValue(), item.getLabel());
}
rgi.setValueMap(elems);
rgi.setDefaultValue(items[0].getStringValue());
@@ -95,11 +98,16 @@
@Override
protected Data[] getData() {
final String value = this.form.getValueAsString("selection");
- final DataItem item = new DefaultDataItem(this.dataName, this.dataName, value);
- return new Data[] { new DefaultData(this.dataName, null, null, new DataItem[] { item }) };
+
+ final DataItem item = new DefaultDataItem("label_irrelevant", "description_irrelevant", value);
+ // Alles hoffnungslos:
+ // final DataItem useHeader = new DefaultDataItem("label_irrelevant", "description_irrelevant",
+ // this.valueLabelMap.get(value));
+
+ return new Data[] { new DefaultData(this.dataName, "label_no_effect", "description_no_effect", new DataItem[] { item // , useHeader
+ })
+ // ,new DefaultData("value", "label", "description", new DataItem[] { useHeader }) DOES NOT WORK
+ };
}
- protected String getTitle(final DataItem item) {
- return item.getLabel();
- }
}
More information about the Dive4Elements-commits
mailing list