]> source.dussan.org Git - vaadin-framework.git/commitdiff
IScrollTable styles cell also when it contains a component (+better tc). Fixes #2125
authorMarc Englund <marc.englund@itmill.com>
Mon, 29 Sep 2008 09:01:10 +0000 (09:01 +0000)
committerMarc Englund <marc.englund@itmill.com>
Mon, 29 Sep 2008 09:01:10 +0000 (09:01 +0000)
svn changeset:5535/svn branch:trunk

src/com/itmill/toolkit/terminal/gwt/client/ui/IScrollTable.java
src/com/itmill/toolkit/tests/tickets/Ticket2125.java

index d104ec030cb94f0071c5bc790678ac14f8b12438..5e4ccaefa9cb45019be6b6748544c1f8bc2befc0 100644 (file)
@@ -2052,8 +2052,10 @@ public class IScrollTable extends Composite implements Table, ScrollListener,
                                 .getPaintable((UIDL) cell);
                         (cellContent).updateFromUIDL((UIDL) cell, client);
                         String style = "";
-                        if (uidl.hasAttribute("style")) {
-                            style = uidl.getStringAttribute("style");
+                        if (uidl.hasAttribute("style-"
+                                + (showRowHeaders ? col - 1 : col))) {
+                            style = uidl.getStringAttribute("style-"
+                                    + (showRowHeaders ? col - 1 : col));
                         }
                         addCell((Widget) cellContent, aligns[col++], style);
                     }
index cf0c251b4c3352bb649d17de470df1c72406d538..46ad984084056883160e27e3fc777a167d2774e6 100644 (file)
@@ -31,8 +31,7 @@ public class Ticket2125 extends Application {
                 table.addItem(new Integer(i));
             }
             table.addContainerProperty("String", String.class, "a string");
-            table.addContainerProperty("Label", Label.class, new Label(
-                    "a label"));
+            table.addContainerProperty("Boolean", Boolean.class, Boolean.TRUE);
             table.addGeneratedColumn("Generated", new ColumnGenerator() {
                 public Component generateCell(Table source, Object itemId,
                         Object columnId) {
@@ -52,8 +51,10 @@ public class Ticket2125 extends Application {
                 }
 
             });
-            addComponent(new Button("editmode", new MethodProperty(table,
-                    "editable")));
+            Button b = new Button("editmode", new MethodProperty(table,
+                    "editable"));
+            b.setImmediate(true);
+            addComponent(b);
         }
     }