Revision 3afedf26
Added by Andreas Kohlbecker almost 7 years ago
src/main/java/eu/etaxonomy/cdm/vaadin/component/TimePeriodField.java | ||
---|---|---|
28 | 28 |
import eu.etaxonomy.cdm.model.common.TimePeriod; |
29 | 29 |
import eu.etaxonomy.cdm.strategy.parser.TimePeriodParser; |
30 | 30 |
import eu.etaxonomy.cdm.vaadin.component.registration.RegistrationStyles; |
31 |
import eu.etaxonomy.cdm.vaadin.util.TimePeriodFormatter; |
|
31 | 32 |
|
32 | 33 |
/** |
33 | 34 |
* @author a.kohlbecker |
... | ... | |
60 | 61 |
|
61 | 62 |
Set<Component> styledComponents = new HashSet<>(); |
62 | 63 |
|
64 |
private TimePeriodFormatter timePeriodFormatter = new TimePeriodFormatter(TimePeriodFormatter.Format.ISO8601); |
|
65 |
|
|
63 | 66 |
/** |
64 | 67 |
* |
65 | 68 |
*/ |
... | ... | |
212 | 215 |
fieldGroup.setItemDataSource(new BeanItem<TimePeriod>(newValue)); |
213 | 216 |
|
214 | 217 |
cacheField.setReadOnly(false); |
215 |
cacheField.setValue(newValue.toString());
|
|
218 |
cacheField.setValue(timePeriodFormatter.print(newValue));
|
|
216 | 219 |
cacheField.setReadOnly(true); |
217 | 220 |
} |
218 | 221 |
|
Also available in: Unified diff
ref #6564 TimePeriodFormatter with support for ISO8601 date format