diff options
author | Teemu Suo-Anttila <tsuoanttila@users.noreply.github.com> | 2017-07-19 09:34:05 +0300 |
---|---|---|
committer | Henri Sara <henri.sara@gmail.com> | 2017-07-19 09:34:05 +0300 |
commit | e8f7de722a7561e25c6bfd1fb007f498db22b1c7 (patch) | |
tree | b66b761eea0c5386f4c8c0112e278f140e08ce6d /client/src | |
parent | ce566c57fa7a020d654b9bdc7c885f8874148aa1 (diff) | |
download | vaadin-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.java | 10 |
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()); + } } }; } |