Mercurial > dive4elements > river
comparison gwt-client/src/main/java/org/dive4elements/river/client/client/ui/uinfo/SingleBehaviour.java @ 9256:6c24c857ccf9
fixation refactoring and inputItem behaviour to interfaces
author | gernotbelger |
---|---|
date | Fri, 13 Jul 2018 12:04:21 +0200 |
parents | |
children | 7337034eb5d5 |
comparison
equal
deleted
inserted
replaced
9255:9be51f776798 | 9256:6c24c857ccf9 |
---|---|
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.uinfo; | |
11 | |
12 import java.util.List; | |
13 | |
14 import org.dive4elements.river.client.client.FLYSConstants; | |
15 | |
16 import com.smartgwt.client.widgets.form.fields.TextItem; | |
17 | |
18 /** | |
19 * @author Domenico Nardi Tironi | |
20 * | |
21 */ | |
22 public class SingleBehaviour extends ValidationBehaviourSingleMultiInputItem { | |
23 | |
24 public SingleBehaviour(final List<String> validInputs, final String errorForItemMsg, final FLYSConstants MSG) { | |
25 super(validInputs, errorForItemMsg, MSG); | |
26 } | |
27 | |
28 public SingleBehaviour() { | |
29 super(); | |
30 } | |
31 | |
32 @Override | |
33 public void appendValue(final TextItem inputItem, final String value) { | |
34 inputItem.setValue(value); | |
35 } | |
36 | |
37 @Override | |
38 public List<String> validate(final List<String> errors, final String inputValueString) { | |
39 errors.addAll(this.validateSingleInput(inputValueString)); | |
40 return errors; | |
41 } | |
42 | |
43 } |