Mercurial > dive4elements > river
comparison gwt-client/src/main/java/org/dive4elements/river/client/client/ui/bundu/BunduWstWQPanel.java @ 9290:3729434f6dec
UD/Q verwechselt
author | gernotbelger |
---|---|
date | Tue, 24 Jul 2018 11:12:46 +0200 |
parents | 82c67b859aa7 |
children | e6958f0e72fa |
comparison
equal
deleted
inserted
replaced
9288:82c67b859aa7 | 9290:3729434f6dec |
---|---|
149 @Override | 149 @Override |
150 public void onChange(final ChangeEvent e) { | 150 public void onChange(final ChangeEvent e) { |
151 | 151 |
152 final String value = e.getValue().toString(); | 152 final String value = e.getValue().toString(); |
153 if (value.equals(String.valueOf(mode.UD))) { | 153 if (value.equals(String.valueOf(mode.UD))) { |
154 enableUD(); | |
155 } else if (value.equals(String.valueOf(mode.Q))) { | |
154 enableQ(); | 156 enableQ(); |
155 } else if (value.equals(String.valueOf(mode.Q))) { | |
156 enableUD(); | |
157 } | 157 } |
158 } | 158 } |
159 }); | 159 }); |
160 return this.modes; | 160 return this.modes; |
161 } | 161 } |
162 | 162 |
163 private void enableUD() { | 163 private void enableUD() { |
164 BunduWstWQPanel.this.list.setVisibility(Visibility.HIDDEN); | |
165 BunduWstWQPanel.this.udForm.setVisibility(Visibility.VISIBLE); | |
166 BunduWstWQPanel.this.tabs.disable(); | |
167 } | |
168 | |
169 private void enableQ() { | |
164 BunduWstWQPanel.this.list.setVisibility(Visibility.VISIBLE); | 170 BunduWstWQPanel.this.list.setVisibility(Visibility.VISIBLE); |
165 BunduWstWQPanel.this.udForm.setVisibility(Visibility.HIDDEN); | 171 BunduWstWQPanel.this.udForm.setVisibility(Visibility.HIDDEN); |
166 BunduWstWQPanel.this.tabs.enable(); | 172 BunduWstWQPanel.this.tabs.enable(); |
167 } | |
168 | |
169 private void enableQ() { | |
170 BunduWstWQPanel.this.list.setVisibility(Visibility.HIDDEN); | |
171 BunduWstWQPanel.this.udForm.setVisibility(Visibility.VISIBLE); | |
172 BunduWstWQPanel.this.tabs.disable(); | |
173 } | 173 } |
174 | 174 |
175 private final String getMode() { | 175 private final String getMode() { |
176 return (String) this.radiogroup.getValue(); | 176 return (String) this.radiogroup.getValue(); |
177 } | 177 } |
244 final List<String> errors = new ArrayList<String>(); | 244 final List<String> errors = new ArrayList<String>(); |
245 if (getMode().equals(mode.Q.toString())) { | 245 if (getMode().equals(mode.Q.toString())) { |
246 errors.addAll(this.validateRange(this.qranges)); | 246 errors.addAll(this.validateRange(this.qranges)); |
247 } else if (getMode().equals(mode.UD.toString())) { | 247 } else if (getMode().equals(mode.UD.toString())) { |
248 try { | 248 try { |
249 if (this.udInputItem.validate()) { | 249 if (!this.udInputItem.validate()) { |
250 errors.add(this.udInputItem.getRequiredMessage()); | 250 errors.add(this.udInputItem.getRequiredMessage()); |
251 } | 251 } |
252 final int test = Integer.valueOf(this.udInputItem.getValueAsString());// irgendwie klappt die validator-validierung nur bei der eingabe von | |
253 // ganzzahlen :-( | |
252 } | 254 } |
253 catch (final NumberFormatException e) { | 255 catch (final NumberFormatException e) { |
254 errors.add(this.MSG.error_invalid_integer()); | 256 errors.add(this.MSG.error_invalid_integer()); |
255 } | 257 } |
256 } | 258 } |