aboutsummaryrefslogtreecommitdiffstats
path: root/client/src
diff options
context:
space:
mode:
authorTeemu Suo-Anttila <tsuoanttila@users.noreply.github.com>2017-07-19 09:34:05 +0300
committerHenri Sara <henri.sara@gmail.com>2017-07-19 09:34:05 +0300
commite8f7de722a7561e25c6bfd1fb007f498db22b1c7 (patch)
treeb66b761eea0c5386f4c8c0112e278f140e08ce6d /client/src
parentce566c57fa7a020d654b9bdc7c885f8874148aa1 (diff)
downloadvaadin-framework-e8f7de722a7561e25c6bfd1fb007f498db22b1c7.tar.gz
vaadin-framework-e8f7de722a7561e25c6bfd1fb007f498db22b1c7.zip
Allow null Components in ComponentRenderer (#9692)8.1.0.rc2
Diffstat (limited to 'client/src')
-rw-r--r--client/src/main/java/com/vaadin/client/connectors/grid/ComponentRendererConnector.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/client/src/main/java/com/vaadin/client/connectors/grid/ComponentRendererConnector.java b/client/src/main/java/com/vaadin/client/connectors/grid/ComponentRendererConnector.java
index c094437538..6315f119cc 100644
--- a/client/src/main/java/com/vaadin/client/connectors/grid/ComponentRendererConnector.java
+++ b/client/src/main/java/com/vaadin/client/connectors/grid/ComponentRendererConnector.java
@@ -51,9 +51,13 @@ public class ComponentRendererConnector
@Override
public void render(RendererCellReference cell, String connectorId,
SimplePanel widget) {
- ComponentConnector connector = (ComponentConnector) ConnectorMap
- .get(getConnection()).getConnector(connectorId);
- widget.setWidget(connector.getWidget());
+ if (connectorId != null) {
+ ComponentConnector connector = (ComponentConnector) ConnectorMap
+ .get(getConnection()).getConnector(connectorId);
+ widget.setWidget(connector.getWidget());
+ } else if (widget.getWidget() != null) {
+ widget.remove(widget.getWidget());
+ }
}
};
}