summaryrefslogtreecommitdiffstats
path: root/server/src/com/vaadin/terminal
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/com/vaadin/terminal')
-rw-r--r--server/src/com/vaadin/terminal/AbstractClientConnector.java10
-rw-r--r--server/src/com/vaadin/terminal/JavaScriptCallbackHelper.java6
2 files changed, 9 insertions, 7 deletions
diff --git a/server/src/com/vaadin/terminal/AbstractClientConnector.java b/server/src/com/vaadin/terminal/AbstractClientConnector.java
index 53b3bb1c9d..2b96c5fb35 100644
--- a/server/src/com/vaadin/terminal/AbstractClientConnector.java
+++ b/server/src/com/vaadin/terminal/AbstractClientConnector.java
@@ -146,6 +146,12 @@ public abstract class AbstractClientConnector implements ClientConnector {
if (null == sharedState) {
sharedState = createState();
}
+
+ Root root = getRoot();
+ if (root != null && !root.getConnectorTracker().isDirty(this)) {
+ requestRepaint();
+ }
+
return sharedState;
}
@@ -280,8 +286,6 @@ public abstract class AbstractClientConnector implements ClientConnector {
public Object invoke(Object proxy, Method method, Object[] args)
throws Throwable {
addMethodInvocationToQueue(rpcInterfaceName, method, args);
- // TODO no need to do full repaint if only RPC calls
- requestRepaint();
return null;
}
@@ -304,6 +308,8 @@ public abstract class AbstractClientConnector implements ClientConnector {
// add to queue
pendingInvocations.add(new ClientMethodInvocation(this, interfaceName,
method, parameters));
+ // TODO no need to do full repaint if only RPC calls
+ requestRepaint();
}
/**
diff --git a/server/src/com/vaadin/terminal/JavaScriptCallbackHelper.java b/server/src/com/vaadin/terminal/JavaScriptCallbackHelper.java
index 6153cf2619..f0063a8708 100644
--- a/server/src/com/vaadin/terminal/JavaScriptCallbackHelper.java
+++ b/server/src/com/vaadin/terminal/JavaScriptCallbackHelper.java
@@ -60,9 +60,7 @@ public class JavaScriptCallbackHelper implements Serializable {
JavaScriptFunction javaScriptCallback) {
callbacks.put(functionName, javaScriptCallback);
JavaScriptConnectorState state = getConnectorState();
- if (state.getCallbackNames().add(functionName)) {
- connector.requestRepaint();
- }
+ state.getCallbackNames().add(functionName);
ensureRpc();
}
@@ -100,7 +98,6 @@ public class JavaScriptCallbackHelper implements Serializable {
connector.addMethodInvocationToQueue(
JavaScriptCallbackRpc.class.getName(), CALL_METHOD,
new Object[] { name, args });
- connector.requestRepaint();
}
public void registerRpc(Class<?> rpcInterfaceType) {
@@ -119,7 +116,6 @@ public class JavaScriptCallbackHelper implements Serializable {
}
rpcInterfaces.put(interfaceName, methodNames);
- connector.requestRepaint();
}
}