]> source.dussan.org Git - vaadin-framework.git/commitdiff
modified to support verifying #1452
authorMatti Tahvonen <matti.tahvonen@itmill.com>
Thu, 28 Feb 2008 10:46:24 +0000 (10:46 +0000)
committerMatti Tahvonen <matti.tahvonen@itmill.com>
Thu, 28 Feb 2008 10:46:24 +0000 (10:46 +0000)
svn changeset:3940/svn branch:trunk

src/com/itmill/toolkit/tests/TestForUpload.java

index aa89b3c64932f7a3f620cff486b4ccfadb852342..5138ff890b86599931657559f88fae8c06fc0bb1 100644 (file)
@@ -26,6 +26,7 @@ import com.itmill.toolkit.ui.OrderedLayout;
 import com.itmill.toolkit.ui.Panel;
 import com.itmill.toolkit.ui.ProgressIndicator;
 import com.itmill.toolkit.ui.Select;
+import com.itmill.toolkit.ui.TextField;
 import com.itmill.toolkit.ui.Upload;
 import com.itmill.toolkit.ui.Button.ClickEvent;
 import com.itmill.toolkit.ui.Upload.FailedEvent;
@@ -57,6 +58,10 @@ public class TestForUpload extends CustomComponent implements
 
     private final Select uploadBufferSelector;
 
+    private TextField textField;
+
+    private Label textFieldValue;
+
     public TestForUpload() {
         setCompositionRoot(main);
         main.addComponent(new Label(
@@ -73,6 +78,11 @@ public class TestForUpload extends CustomComponent implements
                 .addComponent(new Label(
                         "Clicking on button b updates information about upload components status or same with garbage collector."));
 
+        textField = new TextField("Test field");
+        textFieldValue = new Label();
+        main.addComponent(textField);
+        main.addComponent(textFieldValue);
+
         up = new Upload("Upload", buffer);
         up.setImmediate(true);
         up.addListener((FinishedListener) this);
@@ -342,6 +352,8 @@ public class TestForUpload extends CustomComponent implements
     public void uploadStarted(StartedEvent event) {
         pi.setVisible(true);
         l.setValue("Started uploading file " + event.getFilename());
+        textFieldValue.setValue(" TestFields value at the upload start is:"
+                + textField.getValue());
     }
 
 }