summaryrefslogtreecommitdiffstats
path: root/vaadin-app
diff options
context:
space:
mode:
Diffstat (limited to 'vaadin-app')
-rw-r--r--vaadin-app/src/ch/asynk/helloworld/HelloWorldApp.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/vaadin-app/src/ch/asynk/helloworld/HelloWorldApp.java b/vaadin-app/src/ch/asynk/helloworld/HelloWorldApp.java
index bf48c5b..badf223 100644
--- a/vaadin-app/src/ch/asynk/helloworld/HelloWorldApp.java
+++ b/vaadin-app/src/ch/asynk/helloworld/HelloWorldApp.java
@@ -107,6 +107,13 @@ class DataMappingLayout extends FormLayout {
intProperty.setValue(666);
final TextField tf4 = new TextField("MyObjectProperty",intProperty);
tf4.setImmediate(true);
+ tf4.setErrorHandler(new ComponentErrorHandler() {
+ @Override
+ public boolean handleComponentError(ComponentErrorEvent event) {
+ tf4.setComponentError(new UserError("Must be an integer (from handler)"));
+ return true;
+ }
+ });
addComponent(tf4);
//
Button closeButton = new Button("close the application");