Browse Source

Review fixes for #6766

svn changeset:20068/svn branch:6.7
tags/6.7.0.beta1
Jonatan Kronqvist 13 years ago
parent
commit
37337f67ee

+ 4
- 5
src/com/vaadin/terminal/gwt/server/AbstractCommunicationManager.java View 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;
}


+ 9
- 8
src/com/vaadin/terminal/gwt/server/JsonPaintTarget.java View 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;
}

}

Loading…
Cancel
Save