From 759ec0e19569ba6b0d0e43f68cdd25e26ecf55d6 Mon Sep 17 00:00:00 2001 From: Leif Åstrand Date: Mon, 24 Nov 2014 23:00:44 +0200 Subject: Don't pass null to TableXyzElement.as when changing stylename (#13334) Change-Id: Icfa7b6e4affe51111c8f5b4495d97bb80b983087 --- client/src/com/vaadin/client/ui/grid/Escalator.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/client/src/com/vaadin/client/ui/grid/Escalator.java b/client/src/com/vaadin/client/ui/grid/Escalator.java index 5679dfec1f..c91558e2a2 100644 --- a/client/src/com/vaadin/client/ui/grid/Escalator.java +++ b/client/src/com/vaadin/client/ui/grid/Escalator.java @@ -1713,16 +1713,17 @@ public class Escalator extends Widget implements RequiresResize, DeferredWorker this.primaryStyleName = primaryStyleName; // Update already rendered rows and cells - TableRowElement row = root.getRows().getItem(0); + Element row = root.getRows().getItem(0); while (row != null) { UIObject.setStylePrimaryName(row, primaryStyleName + "-row"); - TableCellElement cell = row.getCells().getItem(0); + Element cell = TableRowElement.as(row).getCells().getItem(0); while (cell != null) { + assert TableCellElement.is(cell); UIObject.setStylePrimaryName(cell, primaryStyleName + "-cell"); - cell = TableCellElement.as(cell.getNextSiblingElement()); + cell = cell.getNextSiblingElement(); } - row = TableRowElement.as(row.getNextSiblingElement()); + row = row.getNextSiblingElement(); } } -- cgit v1.2.3