]> source.dussan.org Git - vaadin-framework.git/commitdiff
Continued fix for #1475: setReadOnly(true) fails for: Checkbox, Button, Upload
authorJani Laakso <jani.laakso@itmill.com>
Fri, 7 Mar 2008 13:59:31 +0000 (13:59 +0000)
committerJani Laakso <jani.laakso@itmill.com>
Fri, 7 Mar 2008 13:59:31 +0000 (13:59 +0000)
Upload setReadonly(false) now ignores file upload when set as readonly

svn changeset:4002/svn branch:trunk

src/com/itmill/toolkit/terminal/gwt/server/CommunicationManager.java

index 5fe7a7cec6de83714382a6cdff7c354fe4d14f8a..6c90cd24fc8ecaeb5205f8cdf003e0e905470e53 100644 (file)
@@ -129,6 +129,10 @@ public class CommunicationManager implements Paintable.RepaintRequestListener {
                     final String pid = name.split("_")[0];
                     final Upload uploadComponent = (Upload) idPaintableMap
                             .get(pid);
+                    if (uploadComponent.isReadOnly()) {
+                        throw new FileUploadException(
+                                "Warning: ignored file upload because upload component is set as read-only");
+                    }
                     if (uploadComponent == null) {
                         throw new FileUploadException(
                                 "Upload component not found");