Mercurial > dive4elements > river
comparison gwt-client/src/main/java/org/dive4elements/river/client/client/ui/ValidationHelper.java @ 9260:b570b6fcc052
VegetationZone color added and disabled
author | gernotbelger |
---|---|
date | Tue, 17 Jul 2018 10:59:27 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
9259:66b003701546 | 9260:b570b6fcc052 |
---|---|
1 /** Copyright (C) 2017 by Bundesanstalt für Gewässerkunde | |
2 * Software engineering by | |
3 * Björnsen Beratende Ingenieure GmbH | |
4 * Dr. Schumacher Ingenieurbüro für Wasser und Umwelt | |
5 * | |
6 * This file is Free Software under the GNU AGPL (>=v3) | |
7 * and comes with ABSOLUTELY NO WARRANTY! Check out the | |
8 * documentation coming with Dive4Elements River for details. | |
9 */ | |
10 package org.dive4elements.river.client.client.ui; | |
11 | |
12 import java.util.ArrayList; | |
13 import java.util.List; | |
14 | |
15 import org.dive4elements.river.client.client.FLYSConstants; | |
16 | |
17 import com.smartgwt.client.widgets.form.fields.TextItem; | |
18 | |
19 /** | |
20 * @author Domenico Nardi Tironi | |
21 * | |
22 */ | |
23 public class ValidationHelper { | |
24 public static final List<String> checkForEmpty(final TextItem inputItem, final FLYSConstants MSG) { | |
25 final List<String> errors = new ArrayList<String>(); | |
26 | |
27 if (inputItem.getValueAsString() == null || inputItem.getValueAsString().trim().isEmpty()) { | |
28 errors.add(MSG.empty_filter()); | |
29 return errors; | |
30 } | |
31 return errors; | |
32 } | |
33 } |