summaryrefslogtreecommitdiffstats
path: root/WebContent
diff options
context:
space:
mode:
authorJohannes Dahlström <johannesd@vaadin.com>2012-06-15 11:18:46 +0300
committerJohannes Dahlström <johannesd@vaadin.com>2012-06-15 11:18:46 +0300
commit37a934c2f0c0a8edb7c580ff3a5b351778256368 (patch)
tree392a2a7a172c79ab2005f38359853a0e209b5387 /WebContent
parent024b0a0043748d77e73a06cd7743d58d5412c5b0 (diff)
parent1e46f3fcb5f801c6b8349a4fc5b2e6702a128b6e (diff)
downloadvaadin-framework-37a934c2f0c0a8edb7c580ff3a5b351778256368.tar.gz
vaadin-framework-37a934c2f0c0a8edb7c580ff3a5b351778256368.zip
Merge remote-tracking branch 'origin/master'
Conflicts: src/com/vaadin/terminal/gwt/server/DragAndDropService.java
Diffstat (limited to 'WebContent')
-rw-r--r--WebContent/statictestfiles/jsconnector.js5
-rw-r--r--WebContent/statictestfiles/jsextension.js19
2 files changed, 18 insertions, 6 deletions
diff --git a/WebContent/statictestfiles/jsconnector.js b/WebContent/statictestfiles/jsconnector.js
index db8a065e86..d7f697dbf5 100644
--- a/WebContent/statictestfiles/jsconnector.js
+++ b/WebContent/statictestfiles/jsconnector.js
@@ -1,10 +1,11 @@
-window.com_vaadin_tests_components_javascriptcomponent_BasicJavascriptComponent_ExampleWidget = function() {
+window.com_vaadin_tests_components_javascriptcomponent_BasicJavaScriptComponent_ExampleWidget = function() {
var connector = this;
var rootElement = connector.getWidgetElement();
rootElement.innerHTML = 'Hello world!';
rootElement.onclick = function() {
- connector.getRpcProxyFunction("com.vaadin.tests.components.javascriptcomponent.BasicJavascriptComponent$ExampleClickRpc", "onClick")("message");
+ connector.getRpcProxy().onClick("message");
+ connector.onclick("another message");
}
connector.onStateChange = function() {
console.log('state change:', this.getState());
diff --git a/WebContent/statictestfiles/jsextension.js b/WebContent/statictestfiles/jsextension.js
index df67db8927..1a46300e45 100644
--- a/WebContent/statictestfiles/jsextension.js
+++ b/WebContent/statictestfiles/jsextension.js
@@ -1,13 +1,24 @@
-window.com_vaadin_tests_features_SimpleJavascriptExtensionTest_SimpleJavascriptExtension = function() {
+window.com_vaadin_tests_extensions_SimpleJavaScriptExtensionTest_SimpleJavascriptExtension = function() {
+ var self = this;
var state = this.getState();
- var greetBack = this.getRpcProxyFunction('com.vaadin.tests.features.SimpleJavascriptExtensionTest$SimpleJavascriptExtensionServerRpc', 'greet');
+
+ //var rpc = this.getRpcProxy("com.vaadin.tests.extensions.SimpleJavaScriptExtensionTest.SimpleJavaScriptExtensionServerRpc");
+ var rpc = this.getRpcProxy();
- this.registerRpc("com.vaadin.tests.features.SimpleJavascriptExtensionTest.SimpleJavascriptExtensionClientRpc", {
+// this.registerRpc("com.vaadin.tests.extensions.SimpleJavaScriptExtensionTest.SimpleJavaScriptExtensionClientRpc", {
+ this.registerRpc({
'greet': function(greeting) {
var response = window.prompt(state.prefix + greeting);
if (response !== null) {
- greetBack(response);
+ rpc.greet(response);
}
}
});
+
+ this.greetToClient = function(greeting) {
+ var response = window.prompt(state.prefix + greeting);
+ if (response !== null) {
+ self.greetToServer(response);
+ }
+ }
} \ No newline at end of file