summaryrefslogtreecommitdiffstats
path: root/vaadin-app/src
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2011-09-26 14:50:47 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2011-09-26 14:50:47 +0200
commit518e05b52940b34063c434b055a52f248d4e680c (patch)
tree2b4e75a9868d2dfe62788ef77a6ef78780804ad3 /vaadin-app/src
parentdc0608d8e8c82aeec8261f11dea51e79cf8e38b9 (diff)
downloadskeletons-518e05b52940b34063c434b055a52f248d4e680c.zip
skeletons-518e05b52940b34063c434b055a52f248d4e680c.tar.gz
vaadin-app: use setErrorHandler
Diffstat (limited to 'vaadin-app/src')
-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");