diff options
-rw-r--r-- | client/src/com/vaadin/client/widgets/Grid.java | 2 | ||||
-rw-r--r-- | uitest/src/com/vaadin/tests/components/grid/GridHeaderStyleNamesTest.java | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/client/src/com/vaadin/client/widgets/Grid.java b/client/src/com/vaadin/client/widgets/Grid.java index 806bc6a220..80b20fa184 100644 --- a/client/src/com/vaadin/client/widgets/Grid.java +++ b/client/src/com/vaadin/client/widgets/Grid.java @@ -5592,6 +5592,7 @@ public class Grid<T> extends ResizeComposite implements Element td = cell.getElement(); td.removeAllChildren(); + setCustomStyleName(td, metadata.getStyleName()); Element content; // Wrap text or html content in default header to isolate @@ -5622,7 +5623,6 @@ public class Grid<T> extends ResizeComposite implements } else { content = td; } - setCustomStyleName(content, metadata.getStyleName()); switch (metadata.getType()) { case TEXT: diff --git a/uitest/src/com/vaadin/tests/components/grid/GridHeaderStyleNamesTest.java b/uitest/src/com/vaadin/tests/components/grid/GridHeaderStyleNamesTest.java index f5216b4287..6dffe16a40 100644 --- a/uitest/src/com/vaadin/tests/components/grid/GridHeaderStyleNamesTest.java +++ b/uitest/src/com/vaadin/tests/components/grid/GridHeaderStyleNamesTest.java @@ -85,23 +85,23 @@ public class GridHeaderStyleNamesTest extends SingleBrowserTest { if (set) { assertHasStyleName( "Footer cell should have the assigned 'age-footer' class name", - getAgeFooterCellContent(), "age-footer"); + getAgeFooterCell(), "age-footer"); assertHasStyleName( "Header cell should have the assigned 'age' class name", - getAgeHeaderCellContent(), "age"); + getAgeHeaderCell(), "age"); assertHasStyleName( "The merged header cell should have the assigned 'city-country' class name", - getMergedHeaderCellContent(), "city-country"); + getMergedHeaderCell(), "city-country"); } else { assertHasNotStyleName( "Footer cell should not have the removed 'age-footer' class name", - getAgeFooterCellContent(), "age-footer"); + getAgeFooterCell(), "age-footer"); assertHasNotStyleName( "Header cell should not have the removed 'age' class name", - getAgeHeaderCellContent(), "age"); + getAgeHeaderCell(), "age"); assertHasNotStyleName( "Ther merged header cell should not have the removed 'city-country' class name", - getMergedHeaderCellContent(), "city-country"); + getMergedHeaderCell(), "city-country"); } assertHasStyleName( "The default v-grid-cell style name should not be removed from the header cell", |