]> source.dussan.org Git - vaadin-framework.git/commitdiff
fixes #2933, regression from #2823
authorMatti Tahvonen <matti.tahvonen@itmill.com>
Tue, 12 May 2009 06:40:51 +0000 (06:40 +0000)
committerMatti Tahvonen <matti.tahvonen@itmill.com>
Tue, 12 May 2009 06:40:51 +0000 (06:40 +0000)
svn changeset:7750/svn branch:6.0

src/com/vaadin/ui/Table.java

index de1e744da265239724289894d1388a9db608ed37..426560c4a889af824d3d7e97079bf271b7b5905f 100644 (file)
@@ -1422,6 +1422,26 @@ public class Table extends AbstractSelect implements Action.Container,
 
                                 } else if (iscomponent[j]) {
                                     value = p.getValue();
+                                    if (p instanceof Property.ValueChangeNotifier) {
+                                        /*
+                                         * Component in property may change ->
+                                         * listen value changes events.
+                                         */
+                                        if (oldListenedProperties == null
+                                                || !oldListenedProperties
+                                                        .contains(p)) {
+                                            ((Property.ValueChangeNotifier) p)
+                                                    .addListener(this);
+                                        }
+                                        /*
+                                         * register listened properties, so we
+                                         * can do proper cleanup to free memory.
+                                         * Essential if table has loads of data
+                                         * and it is used for a long time.
+                                         */
+                                        listenedProperties.add(p);
+
+                                    }
                                 } else if (p != null) {
                                     value = getPropertyValue(id, colids[j], p);
                                     /*