Revision 0748ebca
Added by Andreas Kohlbecker almost 7 years ago
src/main/java/eu/etaxonomy/cdm/vaadin/util/converter/JodaTimePartialConverter.java | ||
---|---|---|
122 | 122 |
@Override |
123 | 123 |
public String convertToPresentation(Partial value, Class<? extends String> targetType, Locale locale) |
124 | 124 |
throws com.vaadin.data.util.converter.Converter.ConversionException { |
125 |
String text = null; |
|
125 | 126 |
if(value != null){ |
126 |
switch(format) {
|
|
127 |
switch(format) { |
|
127 | 128 |
case ISO8601: |
128 |
return formatIso8601(value);
|
|
129 |
text = formatIso8601(value);
|
|
129 | 130 |
case DAY_MONTH_YEAR_DOT: |
130 |
return formatYyyymmddDot(value);
|
|
131 |
text = formatYyyymmddDot(value);
|
|
131 | 132 |
default: |
132 |
return "JodaTimePartialConverter Error: unsupported format";
|
|
133 |
text = "JodaTimePartialConverter Error: unsupported format";
|
|
133 | 134 |
} |
134 | 135 |
} |
135 |
return "";
|
|
136 |
return text;
|
|
136 | 137 |
} |
137 | 138 |
|
138 | 139 |
/** |
Also available in: Unified diff
ref #6724 geolocation field: map improvement