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;
private final Select uploadBufferSelector;
+ private TextField textField;
+
+ private Label textFieldValue;
+
public TestForUpload() {
setCompositionRoot(main);
main.addComponent(new Label(
.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);
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());
}
}