diff options
author | Leif Åstrand <leif@vaadin.com> | 2012-06-14 22:57:28 +0300 |
---|---|---|
committer | Leif Åstrand <leif@vaadin.com> | 2012-06-14 22:57:28 +0300 |
commit | 51ce4a2535146a3b8861bd02f655c18d9a397522 (patch) | |
tree | 2c4421863c5255b1595111c6e968b0a84f1c9f4b /WebContent | |
parent | 72c0f66e2aa588acbb517e6d9b482c7a75faf9f1 (diff) | |
download | vaadin-framework-51ce4a2535146a3b8861bd02f655c18d9a397522.tar.gz vaadin-framework-51ce4a2535146a3b8861bd02f655c18d9a397522.zip |
Implement js rpc proxy objects and wildcard rpc support (#8888)
Diffstat (limited to 'WebContent')
-rw-r--r-- | WebContent/statictestfiles/jsconnector.js | 2 | ||||
-rw-r--r-- | WebContent/statictestfiles/jsextension.js | 9 |
2 files changed, 7 insertions, 4 deletions
diff --git a/WebContent/statictestfiles/jsconnector.js b/WebContent/statictestfiles/jsconnector.js index e08c748aa6..d7f697dbf5 100644 --- a/WebContent/statictestfiles/jsconnector.js +++ b/WebContent/statictestfiles/jsconnector.js @@ -4,7 +4,7 @@ window.com_vaadin_tests_components_javascriptcomponent_BasicJavaScriptComponent_ 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() { diff --git a/WebContent/statictestfiles/jsextension.js b/WebContent/statictestfiles/jsextension.js index d824218560..1a46300e45 100644 --- a/WebContent/statictestfiles/jsextension.js +++ b/WebContent/statictestfiles/jsextension.js @@ -1,13 +1,16 @@ window.com_vaadin_tests_extensions_SimpleJavaScriptExtensionTest_SimpleJavascriptExtension = function() { var self = this; var state = this.getState(); - var greetBack = this.getRpcProxyFunction('com.vaadin.tests.extensions.SimpleJavaScriptExtensionTest$SimpleJavaScriptExtensionServerRpc', 'greet'); + + //var rpc = this.getRpcProxy("com.vaadin.tests.extensions.SimpleJavaScriptExtensionTest.SimpleJavaScriptExtensionServerRpc"); + var rpc = this.getRpcProxy(); - this.registerRpc("com.vaadin.tests.extensions.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); } } }); |