Browse Source

IScrollTable styles cell also when it contains a component (+better tc). Fixes #2125

svn changeset:5535/svn branch:trunk
tags/6.7.0.beta1
Marc Englund 15 years ago
parent
commit
575ca40f13

+ 4
- 2
src/com/itmill/toolkit/terminal/gwt/client/ui/IScrollTable.java View 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);
}

+ 5
- 4
src/com/itmill/toolkit/tests/tickets/Ticket2125.java View 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);
}
}


Loading…
Cancel
Save