summaryrefslogtreecommitdiffstats
path: root/documentation
diff options
context:
space:
mode:
authorDenis Anisimov <denis@vaadin.com>2016-08-16 12:47:55 +0300
committerVaadin Code Review <review@vaadin.com>2016-08-17 19:30:05 +0000
commit7a1adf6b3b9878600759eaed26d679c69b603375 (patch)
tree0e4195b11cb3dc8dc831687ab5d4f1770eb8c72f /documentation
parentea3894e96d615c2ee006cb550703bc3e7efd4721 (diff)
downloadvaadin-framework-7a1adf6b3b9878600759eaed26d679c69b603375.tar.gz
vaadin-framework-7a1adf6b3b9878600759eaed26d679c69b603375.zip
Binding.withStatusChangeHandler and Binding.withStatusLabel (#30).
Change-Id: Iecd8bd88d94b98829dfaec43b8635b1e93df330f
Diffstat (limited to 'documentation')
-rw-r--r--documentation/datamodel/datamodel-forms.asciidoc4
1 files changed, 2 insertions, 2 deletions
diff --git a/documentation/datamodel/datamodel-forms.asciidoc b/documentation/datamodel/datamodel-forms.asciidoc
index 8acbffdd7a..fc21226358 100644
--- a/documentation/datamodel/datamodel-forms.asciidoc
+++ b/documentation/datamodel/datamodel-forms.asciidoc
@@ -151,9 +151,9 @@ binder.forField(nameField)
name -> name.length() >= 3,
"Full name must contain at least three characters")
.withStatusChangeHandler(statusChange -> {
- nameStatus.setValue(statusChange.getMessage());
+ nameStatus.setValue(statusChange.getMessage().orElse(""));
// Only show the label when validation has failed
- boolean error = statusChange.getStatus() == Status.ERROR;
+ boolean error = statusChange.getStatus() == ValidationStatus.ERROR;
nameStatus.setVisible(error);
})
.bind(Person::getName, Person::setName);