]> source.dussan.org Git - vaadin-framework.git/commit
Discard for DateField when the data source contains null (#8069)
authorPatrik Lindström <patrik@vaadin.com>
Thu, 23 Jun 2016 13:00:52 +0000 (16:00 +0300)
committerLeif Åstrand <leif@vaadin.com>
Fri, 2 Sep 2016 11:48:43 +0000 (11:48 +0000)
commit3faa43ff39ecda56587b93f0c5e262a2907871a7
tree2be9c993bf7b30ab1af264d90fcbbf72d77cfeac
parent9b66c6eb9bebf657d3f2def8c767e0e9d51cc92c
Discard for DateField when the data source contains null (#8069)

Earlier discard did not work (#8069) if the data source
contained null and the user entered an invalid value for date fields.
The discard logic has been changed such that the error indicators and
internal state of the date field is cleared also if the value entered by
the user is invalid and the data source is null.

attach() updates the value from the data source in the same way as
discard. The old logic in attach is retained.

Change-Id: I5d798a2fdc3d2f0e82a037ea3cb2f57b6432039e
server/src/main/java/com/vaadin/ui/DateField.java
uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldDiscardValue.java [new file with mode: 0644]
uitest/src/test/java/com/vaadin/tests/components/datefield/DateFieldDiscardValueTest.java [new file with mode: 0644]