comparison gwt-client/src/main/java/org/dive4elements/river/client/client/ui/AbstractSingleItemPanel.java @ 9241:cbe393451ab0

minor bugfixes
author gernotbelger
date Tue, 10 Jul 2018 18:53:04 +0200
parents c3994657c15d
children 6c24c857ccf9
comparison
equal deleted inserted replaced
9240:54173301bc34 9241:cbe393451ab0
224 224
225 final String sValue = this.inputItem.getValueAsString(); 225 final String sValue = this.inputItem.getValueAsString();
226 226
227 switch (this.type) { 227 switch (this.type) {
228 case multi: 228 case multi:
229 229 if (sValue != null) {
230 final String[] sValues = sValue.trim().split(" "); 230 final String[] sValues = sValue.trim().split(" ");
231 for (final String value : sValues) { 231 for (final String value : sValues) {
232 errors.addAll(this.validateSingleInput(value)); 232 errors.addAll(this.validateSingleInput(value));
233 }
233 } 234 }
234 break; 235 break;
235 case limit5: 236 case limit5:
236 final String[] values = sValue.trim().split(" "); 237 if (sValue != null) {
237 if (values.length > 5) { 238 final String[] values = sValue.trim().split(" ");
238 errors.add(this.MSG.error_limit_exceeded_salix());// TODO generalize if needed 239 if (values.length > 5) {
239 } 240 errors.add(this.MSG.error_limit_exceeded_salix());// TODO generalize if needed
240 for (int i = 0; i < values.length; i++) { 241 }
241 if (i < 5) 242 for (int i = 0; i < values.length; i++) {
242 errors.addAll(this.validateNumber(values[i])); 243 if (i < 5)
244 errors.addAll(this.validateNumber(values[i]));
245 }
243 } 246 }
244 break; 247 break;
245 case single: 248 case single:
246 errors.addAll(this.validateSingleInput(sValue)); 249 errors.addAll(this.validateSingleInput(sValue));
247 break; 250 break;

http://dive4elements.wald.intevation.org