diff options
Diffstat (limited to 'src/com/vaadin/terminal/gwt/server/AbstractCommunicationManager.java')
-rw-r--r-- | src/com/vaadin/terminal/gwt/server/AbstractCommunicationManager.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/com/vaadin/terminal/gwt/server/AbstractCommunicationManager.java b/src/com/vaadin/terminal/gwt/server/AbstractCommunicationManager.java index e8af424935..ef84d69085 100644 --- a/src/com/vaadin/terminal/gwt/server/AbstractCommunicationManager.java +++ b/src/com/vaadin/terminal/gwt/server/AbstractCommunicationManager.java @@ -332,6 +332,8 @@ public abstract class AbstractCommunicationManager implements private int maxInactiveInterval; + private boolean paintPhase; + private static int nextUnusedWindowSuffix = 1; /** @@ -857,6 +859,8 @@ public abstract class AbstractCommunicationManager implements Window window, boolean analyzeLayouts) throws PaintException, IOException { + paintPhase = true; + if (repaintAll) { makeAllPaintablesDirty(window); } @@ -911,6 +915,8 @@ public abstract class AbstractCommunicationManager implements outWriter.close(); + paintPhase = false; + } public void writeUidlResponce(Callback callback, boolean repaintAll, @@ -1970,6 +1976,10 @@ public abstract class AbstractCommunicationManager implements * @see com.vaadin.terminal.Paintable.RepaintRequestListener#repaintRequested(com.vaadin.terminal.Paintable.RepaintRequestEvent) */ public void repaintRequested(RepaintRequestEvent event) { + if (paintPhase) { + throw new IllegalStateException( + "Paintables shouldn't become dirty in paint phase!!"); + } final Paintable p = event.getPaintable(); if (!dirtyPaintables.contains(p)) { dirtyPaintables.add(p); |