summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2012-11-12 19:56:24 +0200
committerArtur Signell <artur@vaadin.com>2012-11-13 09:53:01 +0200
commit5323d619a769cb73fdcb52e07a2e67451a3dc4e8 (patch)
tree6f91976ebcc85c2319a93d59f0a8313436d51eb3
parentaa6b57956e11173b98f8da2dda914f62b6d2d884 (diff)
downloadvaadin-framework-5323d619a769cb73fdcb52e07a2e67451a3dc4e8.tar.gz
vaadin-framework-5323d619a769cb73fdcb52e07a2e67451a3dc4e8.zip
Fixed widget comparisons to avoid reattaching children (#9807)
Change-Id: Iae6de2bf3d6cbc39fc2b6285eb1e514710e98818
-rw-r--r--client/src/com/vaadin/client/ui/accordion/VAccordion.java12
1 files changed, 9 insertions, 3 deletions
diff --git a/client/src/com/vaadin/client/ui/accordion/VAccordion.java b/client/src/com/vaadin/client/ui/accordion/VAccordion.java
index ce973f9630..70398c238f 100644
--- a/client/src/com/vaadin/client/ui/accordion/VAccordion.java
+++ b/client/src/com/vaadin/client/ui/accordion/VAccordion.java
@@ -131,7 +131,7 @@ public class VAccordion extends VTabsheetBase {
Widget itemWidget = item.getComponent();
if (tabContent != null) {
- if (tabContent != itemWidget) {
+ if (tabContent.getWidget() != itemWidget) {
/*
* This is not the same widget as before, find out if it has
* been moved
@@ -542,8 +542,14 @@ public class VAccordion extends VTabsheetBase {
@Override
protected ComponentConnector getTab(int index) {
if (index < getWidgetCount()) {
- Widget w = getStackItem(index);
- return ConnectorMap.get(client).getConnector(w);
+ StackItem stackItem = getStackItem(index);
+ if (stackItem == null) {
+ return null;
+ }
+ Widget w = stackItem.getChildWidget();
+ if (w != null) {
+ return ConnectorMap.get(client).getConnector(w);
+ }
}
return null;