From: Artur Signell Date: Thu, 15 Mar 2012 12:58:06 +0000 (+0200) Subject: Always paint child components as deferred to ensure the state is sent to X-Git-Tag: 7.0.0.alpha2~310 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=d161331058e3f25d093ab3eb4fcbd817c6462f76;p=vaadin-framework.git Always paint child components as deferred to ensure the state is sent to the client --- 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);