Revision 4dc67561
Added by Andreas Kohlbecker over 6 years ago
src/main/java/eu/etaxonomy/cdm/vaadin/component/TextFieldNFix.java | ||
---|---|---|
16 | 16 |
* default TextField implementation in vaadin 7. TODO: this might no longer be |
17 | 17 |
* required in vaadin 8 since it is supposed to have a mechanism to configure |
18 | 18 |
* the null representations. |
19 |
* <p> |
|
20 |
* Additional features: |
|
21 |
* <ul> |
|
22 |
* <li>entered text is trimmed</li> |
|
23 |
* </ul> |
|
24 |
* |
|
19 | 25 |
* |
20 | 26 |
* @author a.kohlbecker |
21 | 27 |
* @since Dec 21, 2017 |
... | ... | |
83 | 89 |
|
84 | 90 |
|
85 | 91 |
|
92 |
/** |
|
93 |
* {@inheritDoc} |
|
94 |
*/ |
|
95 |
@Override |
|
96 |
protected void setInternalValue(String newValue) { |
|
97 |
if(newValue != null){ |
|
98 |
newValue = newValue.trim(); |
|
99 |
} |
|
100 |
super.setInternalValue(newValue); |
|
101 |
} |
|
102 |
|
|
103 |
|
|
104 |
|
|
105 |
|
|
106 |
|
|
86 | 107 |
} |
Also available in: Unified diff
trimming all text in TextFieldNFix