[PATCH 1 of 2] UD/Q verwechselt
Wald Commits
scm-commit at wald.intevation.org
Tue Jul 24 11:26:35 CEST 2018
# HG changeset patch
# User gernotbelger
# Date 1532423566 -7200
# Node ID 3729434f6dec70ba96012225da5bfbed5077d827
# Parent 82c67b859aa771de5df19776d2eb2bf1aa9415aa
UD/Q verwechselt
diff -r 82c67b859aa7 -r 3729434f6dec gwt-client/src/main/java/org/dive4elements/river/client/client/ui/bundu/BunduWstWQPanel.java
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/bundu/BunduWstWQPanel.java Tue Jul 24 10:39:03 2018 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/bundu/BunduWstWQPanel.java Tue Jul 24 11:12:46 2018 +0200
@@ -151,9 +151,9 @@
final String value = e.getValue().toString();
if (value.equals(String.valueOf(mode.UD))) {
+ enableUD();
+ } else if (value.equals(String.valueOf(mode.Q))) {
enableQ();
- } else if (value.equals(String.valueOf(mode.Q))) {
- enableUD();
}
}
});
@@ -161,17 +161,17 @@
}
private void enableUD() {
+ BunduWstWQPanel.this.list.setVisibility(Visibility.HIDDEN);
+ BunduWstWQPanel.this.udForm.setVisibility(Visibility.VISIBLE);
+ BunduWstWQPanel.this.tabs.disable();
+ }
+
+ private void enableQ() {
BunduWstWQPanel.this.list.setVisibility(Visibility.VISIBLE);
BunduWstWQPanel.this.udForm.setVisibility(Visibility.HIDDEN);
BunduWstWQPanel.this.tabs.enable();
}
- private void enableQ() {
- BunduWstWQPanel.this.list.setVisibility(Visibility.HIDDEN);
- BunduWstWQPanel.this.udForm.setVisibility(Visibility.VISIBLE);
- BunduWstWQPanel.this.tabs.disable();
- }
-
private final String getMode() {
return (String) this.radiogroup.getValue();
}
@@ -246,9 +246,11 @@
errors.addAll(this.validateRange(this.qranges));
} else if (getMode().equals(mode.UD.toString())) {
try {
- if (this.udInputItem.validate()) {
+ if (!this.udInputItem.validate()) {
errors.add(this.udInputItem.getRequiredMessage());
}
+ final int test = Integer.valueOf(this.udInputItem.getValueAsString());// irgendwie klappt die validator-validierung nur bei der eingabe von
+ // ganzzahlen :-(
}
catch (final NumberFormatException e) {
errors.add(this.MSG.error_invalid_integer());
More information about the Dive4Elements-commits
mailing list