]> source.dussan.org Git - vaadin-framework.git/commit
Add method writeBeanAsDraft(bean) in Binder (#11833)
authorTatu Lund <tatu@vaadin.com>
Fri, 29 Nov 2019 12:33:59 +0000 (14:33 +0200)
committerGitHub <noreply@github.com>
Fri, 29 Nov 2019 12:33:59 +0000 (14:33 +0200)
commitdda9b052604967b8d8cfec5c20d06e72f6f78d33
tree55a257469a401f6f4f0564a6ac5367455529050a
parenta8bce6437bb3fb05fa52910cc80cde325b1e72a9
Add method writeBeanAsDraft(bean) in Binder (#11833)

* Add method writeBeanAsDraft(bean) in Binder

With current Binder implementation it is not easy to support Forms, which you want to save as draft, i.e. incomplete. For example there can be big text areas, that require time to fill, or lot of fields. Therefore it is needed to that form can be saved, e.g. to other bean in incomplete state when it is not yet passing validation and this other bean can be persisted to draft storage for further editing in the future. This method helps to achieve that easily.

* Add test case for Binder.writeBeanAsDraft(bean)

Bind a field with validator, set value that does not pass validator and save, assert that value was saved.

* Updating test

* Fixing logic flaw in test

* Further improvement of the test case

* Clarification of the JavaDoc

* Fixing typo

* JavaDoc language check

* Fixing whitespace issue

* Fixing whitespaces

* Fixing whitespaces

* Updating JavaDoc
server/src/main/java/com/vaadin/data/Binder.java
server/src/test/java/com/vaadin/data/BinderTest.java