]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fixed readonly buttons in TwinColSelect
authorJohn Ahlroos <john@vaadin.com>
Wed, 5 Sep 2012 12:20:43 +0000 (15:20 +0300)
committerJohn Ahlroos <john@vaadin.com>
Wed, 5 Sep 2012 12:20:43 +0000 (15:20 +0300)
client/src/com/vaadin/client/ui/twincolselect/VTwinColSelect.java

index 6e5117cec600297bcb3073b0395a6874a2f7e520..cd985876df705f2e00e4f44b5c5a1d521eab5b7d 100644 (file)
@@ -226,8 +226,8 @@ public class VTwinColSelect extends VOptionGroupBase implements KeyDownHandler,
         selections.setMultipleSelect(isMultiselect());
         options.setEnabled(enabled);
         selections.setEnabled(enabled);
-        add.setEnabled(enabled);
-        remove.setEnabled(enabled);
+        add.setEnabled(enabled && !readonly);
+        remove.setEnabled(enabled && !readonly);
         options.clear();
         selections.clear();
         for (final Iterator<?> i = uidl.getChildIterator(); i.hasNext();) {
@@ -247,6 +247,8 @@ public class VTwinColSelect extends VOptionGroupBase implements KeyDownHandler,
 
         }
 
+        add.setStyleName("v-disabled", readonly);
+        remove.setStyleName("v-disabled", readonly);
     }
 
     @Override