Mercurial > dive4elements > river
comparison gwt-client/src/main/java/org/dive4elements/river/client/client/ui/uinfo/ValidationBehaviourSingleMultiInputItem.java @ 9270:7337034eb5d5
multiple whitespace input fix
author | gernotbelger |
---|---|
date | Thu, 19 Jul 2018 13:36:38 +0200 |
parents | c7e5285d434f |
children | 787fc085459b |
comparison
equal
deleted
inserted
replaced
9269:83ebeb620b5a | 9270:7337034eb5d5 |
---|---|
21 */ | 21 */ |
22 public abstract class ValidationBehaviourSingleMultiInputItem implements IMultiSingleBehaviour { | 22 public abstract class ValidationBehaviourSingleMultiInputItem implements IMultiSingleBehaviour { |
23 | 23 |
24 private List<String> validInputs = null; | 24 private List<String> validInputs = null; |
25 private String errorForItemMsg = null; | 25 private String errorForItemMsg = null; |
26 protected FLYSConstants MSG = null; | 26 protected final FLYSConstants MSG; |
27 | 27 |
28 public ValidationBehaviourSingleMultiInputItem(final List<String> validInputs, final String errorForItemMsg, final FLYSConstants MSG) { | 28 public ValidationBehaviourSingleMultiInputItem(final List<String> validInputs, final String errorForItemMsg, final FLYSConstants MSG) { |
29 this.validInputs = validInputs; | 29 this.validInputs = validInputs; |
30 this.errorForItemMsg = errorForItemMsg; | 30 this.errorForItemMsg = errorForItemMsg; |
31 this.MSG = MSG; // etwas unglücklich... | 31 this.MSG = MSG; // etwas unglücklich... |
32 } | 32 } |
33 | 33 |
34 public ValidationBehaviourSingleMultiInputItem() { | 34 public ValidationBehaviourSingleMultiInputItem(final FLYSConstants MSG) { |
35 | 35 this.MSG = MSG; |
36 } | 36 } |
37 | 37 |
38 protected final List<String> validateSingleInput(final String sValue) { | 38 protected final List<String> validateSingleInput(final String sValue) { |
39 final List<String> errors = new ArrayList<String>(); | 39 final List<String> errors = new ArrayList<String>(); |
40 // String filtered = ""; | 40 // String filtered = ""; |
50 } | 50 } |
51 if (!isGood) { | 51 if (!isGood) { |
52 String tmp = this.errorForItemMsg; | 52 String tmp = this.errorForItemMsg; |
53 tmp = tmp.replace("$1", sValue); | 53 tmp = tmp.replace("$1", sValue); |
54 errors.add(tmp); | 54 errors.add(tmp); |
55 // continue; | |
56 } | 55 } |
57 | 56 |
58 return errors; | 57 return errors; |
59 } | 58 } |
60 | 59 |
82 public final void setErrorForItemMsg(final String errorForItemMsg) { | 81 public final void setErrorForItemMsg(final String errorForItemMsg) { |
83 this.errorForItemMsg = errorForItemMsg; | 82 this.errorForItemMsg = errorForItemMsg; |
84 | 83 |
85 } | 84 } |
86 | 85 |
87 @Override | |
88 public void setMSG(final FLYSConstants msg) { | |
89 this.MSG = this.MSG; | |
90 | |
91 } | |
92 | |
93 } | 86 } |