]> source.dussan.org Git - vaadin-framework.git/commitdiff
FieldBinder -> FieldGroup
authorArtur Signell <artur@vaadin.com>
Thu, 22 Dec 2011 20:25:20 +0000 (22:25 +0200)
committerArtur Signell <artur@vaadin.com>
Thu, 22 Dec 2011 21:17:26 +0000 (23:17 +0200)
tests/testbench/com/vaadin/tests/fieldgroup/AbstractBeanFieldBinderTest.java [deleted file]
tests/testbench/com/vaadin/tests/fieldgroup/AbstractBeanFieldGroupTest.java [new file with mode: 0644]
tests/testbench/com/vaadin/tests/fieldgroup/FormWithNestedProperties.java

diff --git a/tests/testbench/com/vaadin/tests/fieldgroup/AbstractBeanFieldBinderTest.java b/tests/testbench/com/vaadin/tests/fieldgroup/AbstractBeanFieldBinderTest.java
deleted file mode 100644 (file)
index d91ebba..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-package com.vaadin.tests.fieldgroup;\r
-\r
-import com.vaadin.data.fieldgroup.BeanFieldGroup;\r
-import com.vaadin.data.fieldgroup.FieldGroup.CommitException;\r
-import com.vaadin.tests.components.TestBase;\r
-import com.vaadin.tests.util.Log;\r
-import com.vaadin.ui.Button;\r
-import com.vaadin.ui.Button.ClickEvent;\r
-import com.vaadin.ui.Button.ClickListener;\r
-import com.vaadin.ui.Root;\r
-\r
-public abstract class AbstractBeanFieldBinderTest extends TestBase {\r
-\r
-    private Button commitButton;\r
-    protected Log log = new Log(5);\r
-\r
-    private Button discardButton;\r
-    private Button showBeanButton;\r
-    private BeanFieldGroup fieldBinder;\r
-\r
-    @Override\r
-    protected void setup() {\r
-        addComponent(log);\r
-    }\r
-\r
-    protected Button getDiscardButton() {\r
-        if (discardButton == null) {\r
-            discardButton = new Button("Discard", new Button.ClickListener() {\r
-\r
-                public void buttonClick(ClickEvent event) {\r
-                    getFieldBinder().discard();\r
-                    log.log("Discarded changes");\r
-\r
-                }\r
-            });\r
-        }\r
-        return discardButton;\r
-    }\r
-\r
-    protected Button getShowBeanButton() {\r
-        if (showBeanButton == null) {\r
-            showBeanButton = new Button("Show bean values",\r
-                    new Button.ClickListener() {\r
-\r
-                        public void buttonClick(ClickEvent event) {\r
-                            log.log(getFieldBinder().getItemDataSource()\r
-                                    .getBean().toString());\r
-\r
-                        }\r
-                    });\r
-        }\r
-        return showBeanButton;\r
-    }\r
-\r
-    protected Button getCommitButton() {\r
-        if (commitButton == null) {\r
-            commitButton = new Button("Commit");\r
-            commitButton.addListener(new ClickListener() {\r
-\r
-                public void buttonClick(ClickEvent event) {\r
-                    String msg = "Commit succesful";\r
-                    try {\r
-                        getFieldBinder().commit();\r
-                    } catch (CommitException e) {\r
-                        msg = "Commit failed: " + e.getMessage();\r
-                    }\r
-                    Root.getCurrentRoot().showNotification(msg);\r
-                    log.log(msg);\r
-\r
-                }\r
-            });\r
-        }\r
-        return commitButton;\r
-    }\r
-\r
-    protected BeanFieldGroup getFieldBinder() {\r
-        return fieldBinder;\r
-    }\r
-\r
-    protected void setFieldBinder(BeanFieldGroup beanFieldBinder) {\r
-        fieldBinder = beanFieldBinder;\r
-    }\r
-\r
-    @Override\r
-    protected String getDescription() {\r
-        // TODO Auto-generated method stub\r
-        return null;\r
-    }\r
-\r
-    @Override\r
-    protected Integer getTicketNumber() {\r
-        // TODO Auto-generated method stub\r
-        return null;\r
-    }\r
-\r
-}\r
diff --git a/tests/testbench/com/vaadin/tests/fieldgroup/AbstractBeanFieldGroupTest.java b/tests/testbench/com/vaadin/tests/fieldgroup/AbstractBeanFieldGroupTest.java
new file mode 100644 (file)
index 0000000..c1a8a40
--- /dev/null
@@ -0,0 +1,96 @@
+package com.vaadin.tests.fieldgroup;\r
+\r
+import com.vaadin.data.fieldgroup.BeanFieldGroup;\r
+import com.vaadin.data.fieldgroup.FieldGroup.CommitException;\r
+import com.vaadin.tests.components.TestBase;\r
+import com.vaadin.tests.util.Log;\r
+import com.vaadin.ui.Button;\r
+import com.vaadin.ui.Button.ClickEvent;\r
+import com.vaadin.ui.Button.ClickListener;\r
+import com.vaadin.ui.Root;\r
+\r
+public abstract class AbstractBeanFieldGroupTest extends TestBase {\r
+\r
+    private Button commitButton;\r
+    protected Log log = new Log(5);\r
+\r
+    private Button discardButton;\r
+    private Button showBeanButton;\r
+    private BeanFieldGroup fieldBinder;\r
+\r
+    @Override\r
+    protected void setup() {\r
+        addComponent(log);\r
+    }\r
+\r
+    protected Button getDiscardButton() {\r
+        if (discardButton == null) {\r
+            discardButton = new Button("Discard", new Button.ClickListener() {\r
+\r
+                public void buttonClick(ClickEvent event) {\r
+                    getFieldBinder().discard();\r
+                    log.log("Discarded changes");\r
+\r
+                }\r
+            });\r
+        }\r
+        return discardButton;\r
+    }\r
+\r
+    protected Button getShowBeanButton() {\r
+        if (showBeanButton == null) {\r
+            showBeanButton = new Button("Show bean values",\r
+                    new Button.ClickListener() {\r
+\r
+                        public void buttonClick(ClickEvent event) {\r
+                            log.log(getFieldBinder().getItemDataSource()\r
+                                    .getBean().toString());\r
+\r
+                        }\r
+                    });\r
+        }\r
+        return showBeanButton;\r
+    }\r
+\r
+    protected Button getCommitButton() {\r
+        if (commitButton == null) {\r
+            commitButton = new Button("Commit");\r
+            commitButton.addListener(new ClickListener() {\r
+\r
+                public void buttonClick(ClickEvent event) {\r
+                    String msg = "Commit succesful";\r
+                    try {\r
+                        getFieldBinder().commit();\r
+                    } catch (CommitException e) {\r
+                        msg = "Commit failed: " + e.getMessage();\r
+                    }\r
+                    Root.getCurrentRoot().showNotification(msg);\r
+                    log.log(msg);\r
+\r
+                }\r
+            });\r
+        }\r
+        return commitButton;\r
+    }\r
+\r
+    protected BeanFieldGroup getFieldBinder() {\r
+        return fieldBinder;\r
+    }\r
+\r
+    protected void setFieldBinder(BeanFieldGroup beanFieldBinder) {\r
+        fieldBinder = beanFieldBinder;\r
+    }\r
+\r
+    @Override\r
+    protected String getDescription() {\r
+        // TODO Auto-generated method stub\r
+        return null;\r
+    }\r
+\r
+    @Override\r
+    protected Integer getTicketNumber() {\r
+        // TODO Auto-generated method stub\r
+        return null;\r
+    }\r
+\r
+}\r
index 205d70eba3765acf853e156c105b5cd40f672808..c035ae67ea37f9f412af8527c5091684d0a4f74e 100644 (file)
@@ -11,7 +11,7 @@ import com.vaadin.ui.CheckBox;
 import com.vaadin.ui.NativeSelect;\r
 import com.vaadin.ui.TextField;\r
 \r
-public class FormWithNestedProperties extends AbstractBeanFieldBinderTest {\r
+public class FormWithNestedProperties extends AbstractBeanFieldGroupTest {\r
 \r
     private Log log = new Log(5);\r
 \r