]> source.dussan.org Git - vaadin-framework.git/commitdiff
cleans cache on some unclean reloads
authorMatti Tahvonen <matti.tahvonen@itmill.com>
Mon, 28 Sep 2009 13:21:32 +0000 (13:21 +0000)
committerMatti Tahvonen <matti.tahvonen@itmill.com>
Mon, 28 Sep 2009 13:21:32 +0000 (13:21 +0000)
svn changeset:8956/svn branch:2009-09-widget-packaging_3332

src/com/vaadin/terminal/gwt/server/CommunicationManager.java

index 11aec9ed282b4ee709d8b081b9e0a2829f0560e6..4af1b05fe9340f05f97dd3318bdd40597e9d52a3 100644 (file)
@@ -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<String> 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();
+        }
+
     }
 }