From eeaca934a6851ea7d901a5692d81a53921ca6bb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Mon, 26 Sep 2011 10:46:15 +0200 Subject: vaadin-app: use ObjectProperty --- vaadin-app/src/ch/asynk/helloworld/HelloWorldApp.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/vaadin-app/src/ch/asynk/helloworld/HelloWorldApp.java b/vaadin-app/src/ch/asynk/helloworld/HelloWorldApp.java index 8abd99d..cb9a029 100644 --- a/vaadin-app/src/ch/asynk/helloworld/HelloWorldApp.java +++ b/vaadin-app/src/ch/asynk/helloworld/HelloWorldApp.java @@ -6,6 +6,7 @@ import com.vaadin.Application; import com.vaadin.terminal.UserError; import com.vaadin.data.Property; import com.vaadin.data.Property.ValueChangeEvent; +import com.vaadin.data.util.ObjectProperty; import com.vaadin.ui.FormLayout; import com.vaadin.ui.VerticalLayout; import com.vaadin.ui.Window; @@ -32,6 +33,15 @@ class DataMappingLayout extends FormLayout { } }); // + Double trouble = 66.6; + final ObjectProperty property = new ObjectProperty(trouble); + final TextField tf2 = new TextField("ObjectProperty", property); + tf2.setImmediate(true); + addComponent(tf2); + final Label lb2 = new Label(property); + lb2.setCaption("The Value"); + addComponent(lb2); + // Button closeButton = new Button("close the application"); closeButton.setDescription("This will close the application"); addComponent(closeButton ); -- cgit v1.1-2-g2b99