-
Bug
-
Resolution: Fixed
-
Major
-
2.9.3
-
None
The HandleFormSubmitAction catches a ParseException and logs an error message when a date is not readable, event if the date is empty (when we want to remove it, for example).
So it is currently not possible to remove a date once it's been set.
saveMetadataAsDate(Request, CompositeMetadata, String) from HandleFormSubmitAction
String dateToParse = ""; try { Date[] dateValues = new Date[values.length]; for (int i = 0; i < values.length; i++) { dateToParse = values[i]; dateValues[i] = df.parse(dateToParse); } metaHolder.setMetadata(metadataName, dateValues); } catch (ParseException e) { _logger.error("Unable to parse date " + dateToParse + ", it will be ignored for metadata " + metadataName, e); }