From d161331058e3f25d093ab3eb4fcbd817c6462f76 Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Thu, 15 Mar 2012 14:58:06 +0200 Subject: [PATCH] Always paint child components as deferred to ensure the state is sent to the client --- .../vaadin/terminal/gwt/server/JsonPaintTarget.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/com/vaadin/terminal/gwt/server/JsonPaintTarget.java b/src/com/vaadin/terminal/gwt/server/JsonPaintTarget.java index 4470970095..8a57d2110e 100644 --- a/src/com/vaadin/terminal/gwt/server/JsonPaintTarget.java +++ b/src/com/vaadin/terminal/gwt/server/JsonPaintTarget.java @@ -702,16 +702,16 @@ public class JsonPaintTarget implements PaintTarget { openPaintables.push(paintable); openPaintableTags.push(tagName); - if (cacheEnabled && isPreviouslyPainted) { - // cached (unmodified) paintable, paint the it now - paintedComponents.add(paintable); - deferredPaintables.remove(paintable); - return PaintStatus.CACHED; - } else if (!topLevelPaintableTag) { + if (!topLevelPaintableTag) { // notify manager: add to paint queue instead of painting now manager.queuePaintable(paintable); deferredPaintables.add(paintable); return PaintStatus.DEFER; + } else if (cacheEnabled && isPreviouslyPainted) { + // cached (unmodified) paintable, paint the it now + paintedComponents.add(paintable); + deferredPaintables.remove(paintable); + return PaintStatus.CACHED; } else { // not a nested paintable, paint the it now paintedComponents.add(paintable); -- 2.39.5