diff options
author | Matti Tahvonen <matti.tahvonen@itmill.com> | 2009-09-25 12:07:09 +0000 |
---|---|---|
committer | Matti Tahvonen <matti.tahvonen@itmill.com> | 2009-09-25 12:07:09 +0000 |
commit | 5ef5da15a7903262494d7e3fd7867dde7ed746c4 (patch) | |
tree | e8227a00f50dd110149c391301536c99a1dd035a /src/com/vaadin/ui/Upload.java | |
parent | 0da15b7ebb4b356e49bda9b9c0fb6faf95029fd2 (diff) | |
download | vaadin-framework-5ef5da15a7903262494d7e3fd7867dde7ed746c4.tar.gz vaadin-framework-5ef5da15a7903262494d7e3fd7867dde7ed746c4.zip |
steps toward simpler widgetset creation. Still needs a lot of cleaning and refining.
svn changeset:8930/svn branch:2009-09-widget-packaging_3332
Diffstat (limited to 'src/com/vaadin/ui/Upload.java')
-rw-r--r-- | src/com/vaadin/ui/Upload.java | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/com/vaadin/ui/Upload.java b/src/com/vaadin/ui/Upload.java index cdea1e6ce3..2ea347fc56 100644 --- a/src/com/vaadin/ui/Upload.java +++ b/src/com/vaadin/ui/Upload.java @@ -1,5 +1,5 @@ -/* -@ITMillApache2LicenseForJavaFiles@ +/* + * @ITMillApache2LicenseForJavaFiles@ */ package com.vaadin.ui; @@ -17,6 +17,7 @@ import com.vaadin.Application; import com.vaadin.terminal.PaintException; import com.vaadin.terminal.PaintTarget; import com.vaadin.terminal.UploadStream; +import com.vaadin.terminal.gwt.client.ui.VUpload; /** * Component for uploading files from client to server. @@ -54,6 +55,7 @@ import com.vaadin.terminal.UploadStream; * @since 3.0 */ @SuppressWarnings("serial") +@ClientWidget(VUpload.class) public class Upload extends AbstractComponent implements Component.Focusable { private boolean delayedFocus; @@ -200,12 +202,13 @@ public class Upload extends AbstractComponent implements Component.Focusable { try { // still try to close output stream out.close(); - } catch (IOException e1) { - // NOP + } catch (IOException ignored) { } fireUploadInterrupted(filename, type, totalBytes, e); endUpload(); interrupted = false; + // throw cause ahead + throw new IllegalStateException("Uploading failed", e); } } } |