Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Schindl2016-03-31 09:21:59 -0400
committerTom Schindl2016-03-31 09:21:59 -0400
commit20f8b8b14fb787d6bcde35407ae05eb1df70705a (patch)
tree00d15a326eb0cc74a0b0ca6d66801d5cf3540017
parent3f50fc7aeb48a192acda56dea32263101592c86d (diff)
downloadorg.eclipse.efxclipse-20f8b8b14fb787d6bcde35407ae05eb1df70705a.tar.gz
org.eclipse.efxclipse-20f8b8b14fb787d6bcde35407ae05eb1df70705a.tar.xz
org.eclipse.efxclipse-20f8b8b14fb787d6bcde35407ae05eb1df70705a.zip
Bug 490787 - Add validation and decoration support
-rw-r--r--demos/org.eclipse.fx.ui.controls.sample/src/org/eclipse/fx/ui/controls/sample/ValidationSample.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/demos/org.eclipse.fx.ui.controls.sample/src/org/eclipse/fx/ui/controls/sample/ValidationSample.java b/demos/org.eclipse.fx.ui.controls.sample/src/org/eclipse/fx/ui/controls/sample/ValidationSample.java
index 964d1aa7a..c3c80047a 100644
--- a/demos/org.eclipse.fx.ui.controls.sample/src/org/eclipse/fx/ui/controls/sample/ValidationSample.java
+++ b/demos/org.eclipse.fx.ui.controls.sample/src/org/eclipse/fx/ui/controls/sample/ValidationSample.java
@@ -53,7 +53,8 @@ public class ValidationSample extends Application {
p.getChildren().add(l);
TextField field = new TextField();
- p.getChildren().add(form.builder("firstname",field.textProperty(), vm.firstname, BindingConfiguration.VALIDATE_TO_OPPOSITE).decoratedNode(field)
+ p.getChildren().add(form.builder("firstname",field.textProperty(), vm.firstname, BindingConfiguration.VALIDATE_TO_OPPOSITE)
+ .decoratedNode(field)
.decoratedNodeMutator(new GridData(GridData.FILL_HORIZONTAL), GridLayoutPane::setConstraint)
.validator( s -> s.isEmpty() ? Status.status(State.ERROR, -1, "Vorname muß befüllt sein", null) : Status.ok())
.build()
@@ -65,7 +66,8 @@ public class ValidationSample extends Application {
p.getChildren().add(l);
TextField field = new TextField();
- p.getChildren().add(form.builder("lastname",field.textProperty(), vm.lastname, BindingConfiguration.VALIDATE_TO_OPPOSITE).decoratedNode(field)
+ p.getChildren().add(form.builder("lastname",field.textProperty(), vm.lastname, BindingConfiguration.VALIDATE_TO_OPPOSITE)
+ .decoratedNode(field)
.decoratedNodeMutator(new GridData(GridData.FILL_HORIZONTAL), GridLayoutPane::setConstraint)
.validator( s -> s.isEmpty() ? Status.status(State.ERROR, -1, "Nachname muß befüllt sein", null) : Status.ok())
.build()

Back to the top