From a42fe556c27397c606183864909c9dd0e012d35a Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Mon, 18 May 2015 21:39:06 +0300 Subject: Handle generated empty string style names properly (#17335) Change-Id: I1adce18f238fd4357b0eb1be68ebf7a3aaa6dd6e --- server/src/com/vaadin/data/RpcDataProviderExtension.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'server/src/com/vaadin/data') diff --git a/server/src/com/vaadin/data/RpcDataProviderExtension.java b/server/src/com/vaadin/data/RpcDataProviderExtension.java index cc1fbcf5e3..9d18736ba8 100644 --- a/server/src/com/vaadin/data/RpcDataProviderExtension.java +++ b/server/src/com/vaadin/data/RpcDataProviderExtension.java @@ -1134,7 +1134,7 @@ public class RpcDataProviderExtension extends AbstractExtension { Object propertyId = column.getPropertyId(); cellReference.set(propertyId); String style = generator.getStyle(cellReference); - if (style != null) { + if (style != null && !style.isEmpty()) { if (cellStyles == null) { cellStyles = Json.createObject(); } @@ -1152,7 +1152,7 @@ public class RpcDataProviderExtension extends AbstractExtension { private void setGeneratedRowStyles(RowStyleGenerator generator, JsonObject rowObject) { String rowStyle = generator.getStyle(rowReference); - if (rowStyle != null) { + if (rowStyle != null && !rowStyle.isEmpty()) { rowObject.put(GridState.JSONKEY_ROWSTYLE, rowStyle); } } -- cgit v1.2.3