summaryrefslogtreecommitdiffstats
path: root/uitest/src/com/vaadin/tests/widgetset
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2013-03-08 16:59:04 +0200
committerLeif Åstrand <leif@vaadin.com>2013-03-11 12:53:31 +0200
commit3e83aa8b8bb61690ecf4d54a5e816c06b1c80709 (patch)
tree05713bcaa7db6436c1ec053cc8eca0d597c6570e /uitest/src/com/vaadin/tests/widgetset
parent6c3224ea3846c00efa621abd8134438bc9790837 (diff)
downloadvaadin-framework-3e83aa8b8bb61690ecf4d54a5e816c06b1c80709.tar.gz
vaadin-framework-3e83aa8b8bb61690ecf4d54a5e816c06b1c80709.zip
Properly recognize class of redefined UI connector (#10867)
Change-Id: I8e3afbd669123a846214c3bd65bf696aa2b5a536
Diffstat (limited to 'uitest/src/com/vaadin/tests/widgetset')
-rw-r--r--uitest/src/com/vaadin/tests/widgetset/TestingWidgetSet.gwt.xml5
-rw-r--r--uitest/src/com/vaadin/tests/widgetset/client/CustomUIConnector.java41
-rw-r--r--uitest/src/com/vaadin/tests/widgetset/client/CustomUIConnectorRpc.java23
3 files changed, 69 insertions, 0 deletions
diff --git a/uitest/src/com/vaadin/tests/widgetset/TestingWidgetSet.gwt.xml b/uitest/src/com/vaadin/tests/widgetset/TestingWidgetSet.gwt.xml
index c127d3bb21..919a4a5d69 100644
--- a/uitest/src/com/vaadin/tests/widgetset/TestingWidgetSet.gwt.xml
+++ b/uitest/src/com/vaadin/tests/widgetset/TestingWidgetSet.gwt.xml
@@ -3,4 +3,9 @@
<!-- Inherit the DefaultWidgetSet -->
<inherits name="com.vaadin.DefaultWidgetSet" />
+
+ <replace-with class="com.vaadin.tests.widgetset.client.CustomUIConnector">
+ <when-type-is class="com.vaadin.client.ui.ui.UIConnector" />
+ </replace-with>
+
</module>
diff --git a/uitest/src/com/vaadin/tests/widgetset/client/CustomUIConnector.java b/uitest/src/com/vaadin/tests/widgetset/client/CustomUIConnector.java
new file mode 100644
index 0000000000..ddf6763f1b
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/widgetset/client/CustomUIConnector.java
@@ -0,0 +1,41 @@
+/*
+ * Copyright 2000-2013 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+package com.vaadin.tests.widgetset.client;
+
+import com.google.gwt.dom.client.Document;
+import com.google.gwt.dom.client.SpanElement;
+import com.vaadin.client.Util;
+import com.vaadin.client.ui.ui.UIConnector;
+import com.vaadin.shared.ui.Connect;
+import com.vaadin.ui.UI;
+
+@Connect(UI.class)
+public class CustomUIConnector extends UIConnector {
+ @Override
+ protected void init() {
+ super.init();
+ registerRpc(CustomUIConnectorRpc.class, new CustomUIConnectorRpc() {
+ @Override
+ public void test() {
+ SpanElement span = Document.get().createSpanElement();
+ span.setInnerText("This is the "
+ + Util.getSimpleName(CustomUIConnector.this));
+ Document.get().getBody().insertFirst(span);
+ }
+ });
+ }
+}
diff --git a/uitest/src/com/vaadin/tests/widgetset/client/CustomUIConnectorRpc.java b/uitest/src/com/vaadin/tests/widgetset/client/CustomUIConnectorRpc.java
new file mode 100644
index 0000000000..217d906137
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/widgetset/client/CustomUIConnectorRpc.java
@@ -0,0 +1,23 @@
+/*
+ * Copyright 2000-2013 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+package com.vaadin.tests.widgetset.client;
+
+import com.vaadin.shared.communication.ClientRpc;
+
+public interface CustomUIConnectorRpc extends ClientRpc {
+ public void test();
+}