]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fixed partially #1475: setReadOnly(true) fails for: Checkbox, Button, Upload
authorJani Laakso <jani.laakso@itmill.com>
Fri, 7 Mar 2008 13:24:37 +0000 (13:24 +0000)
committerJani Laakso <jani.laakso@itmill.com>
Fri, 7 Mar 2008 13:24:37 +0000 (13:24 +0000)
Checkbox and Button setReadonly(false) now disables iCheckbox and iButton on the client-side.

svn changeset:3998/svn branch:trunk

src/com/itmill/toolkit/terminal/gwt/client/ui/IButton.java
src/com/itmill/toolkit/terminal/gwt/client/ui/ICheckBox.java

index b69cb0761ae952510cb46009eb42e5916c3ba3f1..620cf3b3cc2c0ac9bffca01487d2ddf99f6a4798 100644 (file)
@@ -87,6 +87,10 @@ public class IButton extends Button implements Paintable {
             errorIndicatorElement = null;
         }
 
+        if (uidl.hasAttribute("readonly")) {
+            setEnabled(false);
+        }
+
         if (uidl.hasAttribute("icon")) {
             if (icon == null) {
                 icon = new Icon(client);
index a4f5f8dafd6df22a090944e9977465cb9603aa78..b326e6e42d76edb7804079c0efb85e2bb90f0488 100644 (file)
@@ -81,6 +81,10 @@ public class ICheckBox extends com.google.gwt.user.client.ui.CheckBox implements
             setTitle(uidl.getStringAttribute("description"));
         }
 
+        if (uidl.hasAttribute("readonly")) {
+            setEnabled(false);
+        }
+
         if (uidl.hasAttribute("icon")) {
             if (icon == null) {
                 icon = new Icon(client);