From: Artur Signell Date: Thu, 15 Mar 2012 11:07:34 +0000 (+0200) Subject: Documented why the order should be hierarchy listener before state X-Git-Tag: 7.0.0.alpha2~317 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=b3af7980469a4542e8f23abd425e7495b8faade3;p=vaadin-framework.git Documented why the order should be hierarchy listener before state listener --- diff --git a/src/com/vaadin/terminal/gwt/client/ApplicationConnection.java b/src/com/vaadin/terminal/gwt/client/ApplicationConnection.java index 9932212623..fdaaf17d3b 100644 --- a/src/com/vaadin/terminal/gwt/client/ApplicationConnection.java +++ b/src/com/vaadin/terminal/gwt/client/ApplicationConnection.java @@ -1013,12 +1013,16 @@ public class ApplicationConnection { // Update hierarchy, do not fire events Collection pendingHierarchyChangeEvents = updateConnectorHierarchy(json); - // Fire state change events (TODO) - VConsole.log(" * Sending state change events"); - // Fire hierarchy change events sendHierarchyChangeEvents(pendingHierarchyChangeEvents); + // (TODO) Fire state change events. Should be after hierarchy + // change listeners: At least caption updates for the parent are + // strange if fired from state change listeners and thus calls + // the parent BEFORE the parent is aware of the child (through a + // hierarchy change event) + VConsole.log(" * Sending state change events"); + // Update of legacy (UIDL) style connectors updateVaadin6StyleConnectors(json);