summaryrefslogtreecommitdiffstats
path: root/uitest
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2012-11-06 17:51:39 +0200
committerVaadin Code Review <review@vaadin.com>2012-11-07 12:40:32 +0000
commitd1c55ddd236de43ebe836c01b7d6c8b8943a79a8 (patch)
tree7d96edd61767b414cf7922cc205bd3ce6d7affde /uitest
parent9f23ec3b1a577522d8ce54f9b130a2eca4cd6040 (diff)
downloadvaadin-framework-d1c55ddd236de43ebe836c01b7d6c8b8943a79a8.tar.gz
vaadin-framework-d1c55ddd236de43ebe836c01b7d6c8b8943a79a8.zip
Added AbstractConnector.getRpcProxy helper (#10143)
Change-Id: I52ca9908763cc7416a2c50971252429cd8c294e8
Diffstat (limited to 'uitest')
-rw-r--r--uitest/src/com/vaadin/tests/widgetset/client/SerializerTestConnector.java4
-rw-r--r--uitest/src/com/vaadin/tests/widgetset/client/helloworldfeature/HelloWorldExtensionConnector.java4
-rw-r--r--uitest/src/com/vaadin/tests/widgetset/client/minitutorials/v7a3/RefresherConnector.java5
-rw-r--r--uitest/src/com/vaadin/tests/widgetset/client/minitutorials/v7b1/CapsLockWarningWithRpcConnector.java4
4 files changed, 4 insertions, 13 deletions
diff --git a/uitest/src/com/vaadin/tests/widgetset/client/SerializerTestConnector.java b/uitest/src/com/vaadin/tests/widgetset/client/SerializerTestConnector.java
index 7783178a3b..6822edb34c 100644
--- a/uitest/src/com/vaadin/tests/widgetset/client/SerializerTestConnector.java
+++ b/uitest/src/com/vaadin/tests/widgetset/client/SerializerTestConnector.java
@@ -26,7 +26,6 @@ import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
-import com.vaadin.client.communication.RpcProxy;
import com.vaadin.client.communication.StateChangeEvent;
import com.vaadin.client.extensions.AbstractExtensionConnector;
import com.vaadin.shared.Connector;
@@ -37,8 +36,7 @@ import com.vaadin.tests.widgetset.server.SerializerTestExtension;
@Connect(SerializerTestExtension.class)
public class SerializerTestConnector extends AbstractExtensionConnector {
- private SerializerTestRpc rpc = RpcProxy.create(SerializerTestRpc.class,
- this);
+ private SerializerTestRpc rpc = getRpcProxy(SerializerTestRpc.class);
public SerializerTestConnector() {
registerRpc(SerializerTestRpc.class, new SerializerTestRpc() {
diff --git a/uitest/src/com/vaadin/tests/widgetset/client/helloworldfeature/HelloWorldExtensionConnector.java b/uitest/src/com/vaadin/tests/widgetset/client/helloworldfeature/HelloWorldExtensionConnector.java
index 76dbdd5370..a0a6911eb2 100644
--- a/uitest/src/com/vaadin/tests/widgetset/client/helloworldfeature/HelloWorldExtensionConnector.java
+++ b/uitest/src/com/vaadin/tests/widgetset/client/helloworldfeature/HelloWorldExtensionConnector.java
@@ -19,14 +19,12 @@ import com.google.gwt.user.client.Window;
import com.vaadin.client.ServerConnector;
import com.vaadin.client.Util;
import com.vaadin.client.VConsole;
-import com.vaadin.client.communication.RpcProxy;
import com.vaadin.client.extensions.AbstractExtensionConnector;
import com.vaadin.shared.ui.Connect;
import com.vaadin.tests.extensions.HelloWorldExtension;
@Connect(HelloWorldExtension.class)
public class HelloWorldExtensionConnector extends AbstractExtensionConnector {
- HelloWorldRpc rpc = RpcProxy.create(HelloWorldRpc.class, this);
@Override
public HelloWorldState getState() {
@@ -56,6 +54,6 @@ public class HelloWorldExtensionConnector extends AbstractExtensionConnector {
VConsole.log(msg);
String response = Window.prompt(msg, "");
- rpc.onMessageSent(response);
+ getRpcProxy(HelloWorldRpc.class).onMessageSent(response);
}
}
diff --git a/uitest/src/com/vaadin/tests/widgetset/client/minitutorials/v7a3/RefresherConnector.java b/uitest/src/com/vaadin/tests/widgetset/client/minitutorials/v7a3/RefresherConnector.java
index 26fa22a667..2deef7e1ba 100644
--- a/uitest/src/com/vaadin/tests/widgetset/client/minitutorials/v7a3/RefresherConnector.java
+++ b/uitest/src/com/vaadin/tests/widgetset/client/minitutorials/v7a3/RefresherConnector.java
@@ -1,7 +1,6 @@
package com.vaadin.tests.widgetset.client.minitutorials.v7a3;
import com.google.gwt.user.client.Timer;
-import com.vaadin.client.communication.RpcProxy;
import com.vaadin.client.communication.StateChangeEvent;
import com.vaadin.client.extensions.AbstractExtensionConnector;
import com.vaadin.shared.ui.Connect;
@@ -10,12 +9,10 @@ import com.vaadin.tests.minitutorials.v7a3.Refresher;
@Connect(Refresher.class)
public class RefresherConnector extends AbstractExtensionConnector {
- private RefresherRpc rpc = RpcProxy.create(RefresherRpc.class, this);
-
private Timer timer = new Timer() {
@Override
public void run() {
- rpc.refresh();
+ getRpcProxy(RefresherRpc.class).refresh();
}
};
diff --git a/uitest/src/com/vaadin/tests/widgetset/client/minitutorials/v7b1/CapsLockWarningWithRpcConnector.java b/uitest/src/com/vaadin/tests/widgetset/client/minitutorials/v7b1/CapsLockWarningWithRpcConnector.java
index b7dead9819..c587f53968 100644
--- a/uitest/src/com/vaadin/tests/widgetset/client/minitutorials/v7b1/CapsLockWarningWithRpcConnector.java
+++ b/uitest/src/com/vaadin/tests/widgetset/client/minitutorials/v7b1/CapsLockWarningWithRpcConnector.java
@@ -6,7 +6,6 @@ import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.Widget;
import com.vaadin.client.ComponentConnector;
import com.vaadin.client.ServerConnector;
-import com.vaadin.client.communication.RpcProxy;
import com.vaadin.client.extensions.AbstractExtensionConnector;
import com.vaadin.client.ui.VOverlay;
import com.vaadin.shared.ui.Connect;
@@ -15,8 +14,7 @@ import com.vaadin.tests.minitutorials.v7b1.CapsLockWarningWithRpc;
@Connect(CapsLockWarningWithRpc.class)
public class CapsLockWarningWithRpcConnector extends AbstractExtensionConnector {
- private CapsLockWarningRpc rpc = RpcProxy.create(CapsLockWarningRpc.class,
- this);
+ private CapsLockWarningRpc rpc = getRpcProxy(CapsLockWarningRpc.class);
@Override
protected void extend(ServerConnector target) {