diff options
Diffstat (limited to 'client/src')
-rw-r--r-- | client/src/com/vaadin/client/ui/VCustomLayout.java | 4 | ||||
-rw-r--r-- | client/src/com/vaadin/client/ui/customlayout/CustomLayoutConnector.java | 9 |
2 files changed, 13 insertions, 0 deletions
diff --git a/client/src/com/vaadin/client/ui/VCustomLayout.java b/client/src/com/vaadin/client/ui/VCustomLayout.java index 5f8a8197d0..0ee50fe0dd 100644 --- a/client/src/com/vaadin/client/ui/VCustomLayout.java +++ b/client/src/com/vaadin/client/ui/VCustomLayout.java @@ -305,6 +305,10 @@ public class VCustomLayout extends ComplexPanel { /** Update caption for given widget */ public void updateCaption(ComponentConnector paintable) { Widget widget = paintable.getWidget(); + if (widget.getParent() != this) { + // Widget has not been added because the location was not found + return; + } VCaptionWrapper wrapper = childWidgetToCaptionWrapper.get(widget); if (VCaption.isNeeded(paintable.getState())) { if (wrapper == null) { diff --git a/client/src/com/vaadin/client/ui/customlayout/CustomLayoutConnector.java b/client/src/com/vaadin/client/ui/customlayout/CustomLayoutConnector.java index cde1f1af0f..abbb0ef60b 100644 --- a/client/src/com/vaadin/client/ui/customlayout/CustomLayoutConnector.java +++ b/client/src/com/vaadin/client/ui/customlayout/CustomLayoutConnector.java @@ -15,6 +15,8 @@ */ package com.vaadin.client.ui.customlayout; +import java.util.logging.Logger; + import com.google.gwt.user.client.DOM; import com.google.gwt.user.client.ui.Widget; import com.vaadin.client.ApplicationConnection; @@ -111,6 +113,9 @@ public class CustomLayoutConnector extends AbstractLayoutConnector implements getWidget().setWidget(child.getWidget(), location); } catch (final IllegalArgumentException e) { // If no location is found, this component is not visible + getLogger().warning( + "Child not rendered as no slot with id '" + location + + "' has been defined"); } } for (ComponentConnector oldChild : event.getOldChildren()) { @@ -147,4 +152,8 @@ public class CustomLayoutConnector extends AbstractLayoutConnector implements // Not interested in anything from the UIDL - just implementing the // interface to avoid some warning (#8688) } + + private static Logger getLogger() { + return Logger.getLogger(CustomLayoutConnector.class.getName()); + } } |