]> source.dussan.org Git - vaadin-framework.git/commitdiff
Review fixes for #6766
authorJonatan Kronqvist <jonatan.kronqvist@itmill.com>
Tue, 2 Aug 2011 06:07:54 +0000 (06:07 +0000)
committerJonatan Kronqvist <jonatan.kronqvist@itmill.com>
Tue, 2 Aug 2011 06:07:54 +0000 (06:07 +0000)
svn changeset:20068/svn branch:6.7

src/com/vaadin/terminal/gwt/server/AbstractCommunicationManager.java
src/com/vaadin/terminal/gwt/server/JsonPaintTarget.java

index d43ee328847b95a926ab30ce080fb936ecb70816..b566077ef129334ac0ec97dcc9f7d0a1380b22a6 100644 (file)
@@ -825,7 +825,7 @@ public abstract class AbstractCommunicationManager implements
                 repaintAll = true;
             }
 
-            writeUidlResponse(callback, repaintAll, outWriter, window,
+            writeUidlResponce(callback, repaintAll, outWriter, window,
                     analyzeLayouts);
 
         }
@@ -835,7 +835,7 @@ public abstract class AbstractCommunicationManager implements
 
     }
 
-    public void writeUidlResponse(Callback callback, boolean repaintAll,
+    public void writeUidlResponce(Callback callback, boolean repaintAll,
             final PrintWriter outWriter, Window window, boolean analyzeLayouts)
             throws PaintException {
         outWriter.print("\"changes\":[");
@@ -845,7 +845,7 @@ public abstract class AbstractCommunicationManager implements
         List<InvalidLayout> invalidComponentRelativeSizes = null;
 
         JsonPaintTarget paintTarget = new JsonPaintTarget(this, outWriter,
-                repaintAll);
+                !repaintAll);
         OpenWindowCache windowCache = currentlyOpenWindowsInClient.get(window
                 .getName());
         if (windowCache == null) {
@@ -2192,8 +2192,7 @@ public abstract class AbstractCommunicationManager implements
 
         public SimpleMultiPartInputStream(InputStream realInputStream,
                 String boundaryString) {
-            boundary = (CRLF + DASHDASH + boundaryString)
-                    .toCharArray();
+            boundary = (CRLF + DASHDASH + boundaryString).toCharArray();
             this.realInputStream = realInputStream;
         }
 
index cd31d4bbcab01089a2c54fc91d2eac44a0946d7c..2f9a614b5f9e301b8deb4b980a3000ef86df63a0 100644 (file)
@@ -79,7 +79,7 @@ public class JsonPaintTarget implements PaintTarget {
 
     private int errorsOpen;
 
-    private boolean fullRepaint = false;
+    private boolean cacheEnabled = false;
 
     private final Collection<Paintable> paintedComponents = new HashSet<Paintable>();
 
@@ -94,14 +94,15 @@ public class JsonPaintTarget implements PaintTarget {
      * @param manager
      * @param outWriter
      *            A character-output stream.
-     * @param fullRepaint
-     *            true if this is a full repaint, i.e. caches are to be
-     *            bypassed.
+     * @param cachingRequired
+     *            true if this is not a full repaint, i.e. caches are to be
+     *            used.
      * @throws PaintException
      *             if the paint operation failed.
      */
     public JsonPaintTarget(AbstractCommunicationManager manager,
-            PrintWriter outWriter, boolean fullRepaint) throws PaintException {
+            PrintWriter outWriter, boolean cachingRequired)
+            throws PaintException {
 
         this.manager = manager;
 
@@ -111,7 +112,7 @@ public class JsonPaintTarget implements PaintTarget {
         // Initialize tag-writing
         mOpenTags = new Stack<String>();
         openJsonTags = new Stack<JsonTag>();
-        this.fullRepaint = fullRepaint;
+        cacheEnabled = cachingRequired;
     }
 
     public void startTag(String tagName) throws PaintException {
@@ -686,7 +687,7 @@ public class JsonPaintTarget implements PaintTarget {
             customLayoutArgumentsOpen = true;
         }
 
-        return !fullRepaint && isPreviouslyPainted;
+        return cacheEnabled && isPreviouslyPainted;
     }
 
     @Deprecated
@@ -1119,7 +1120,7 @@ public class JsonPaintTarget implements PaintTarget {
      * @see com.vaadin.terminal.PaintTarget#isFullRepaint()
      */
     public boolean isFullRepaint() {
-        return fullRepaint;
+        return !cacheEnabled;
     }
 
 }