From: Matti Tahvonen Date: Mon, 28 Sep 2009 13:21:32 +0000 (+0000) Subject: cleans cache on some unclean reloads X-Git-Tag: 6.7.0.beta1~2433^2~6 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=d4493a155dcbf2a0c03623376e7ca49699ab8225;p=vaadin-framework.git cleans cache on some unclean reloads svn changeset:8956/svn branch:2009-09-widget-packaging_3332 --- diff --git a/src/com/vaadin/terminal/gwt/server/CommunicationManager.java b/src/com/vaadin/terminal/gwt/server/CommunicationManager.java index 11aec9ed28..4af1b05fe9 100644 --- a/src/com/vaadin/terminal/gwt/server/CommunicationManager.java +++ b/src/com/vaadin/terminal/gwt/server/CommunicationManager.java @@ -318,8 +318,8 @@ public class CommunicationManager implements Paintable.RepaintRequestListener, final PrintWriter outWriter, Window window, boolean analyzeLayouts) throws IOException, ServletException, PaintException { - // If repaint is requested, clean all ids in this root window if (repaintAll) { + // If repaint is requested, clean all ids in this root window for (final Iterator it = idPaintableMap.keySet().iterator(); it .hasNext();) { final Component c = (Component) idPaintableMap.get(it.next()); @@ -328,6 +328,12 @@ public class CommunicationManager implements Paintable.RepaintRequestListener, paintableIdMap.remove(c); } } + // clean WindowCache + OpenWindowCache openWindowCache = currentlyOpenWindowsInClient + .get(window.getName()); + if (openWindowCache != null) { + openWindowCache.clear(); + } } // Removes application if it has stopped during variable changes @@ -1576,6 +1582,8 @@ public class CommunicationManager implements Paintable.RepaintRequestListener, /** * Helper class for terminal to keep track of data that client is expected * to know. + * + * TODO make customlayout templates (from theme) to be cached here. */ class OpenWindowCache { @@ -1590,5 +1598,9 @@ public class CommunicationManager implements Paintable.RepaintRequestListener, return res.add(object); } + public void clear() { + res.clear(); + } + } }