diff options
author | Leif Åstrand <leif@vaadin.com> | 2012-08-10 10:40:53 +0300 |
---|---|---|
committer | Leif Åstrand <leif@vaadin.com> | 2012-08-10 10:41:20 +0300 |
commit | 454f44738b20b22aeeb327523f1306b46d3cbef6 (patch) | |
tree | 296da93d252ad374d7c30051b4aba6dc9f256b6b | |
parent | c0a192974a4d64f12128a1a957d331a82101a0f4 (diff) | |
download | vaadin-framework-454f44738b20b22aeeb327523f1306b46d3cbef6.tar.gz vaadin-framework-454f44738b20b22aeeb327523f1306b46d3cbef6.zip |
Revert "Run JavaScript RPC with this pointing to the connector wrapper (#9096)"
This reverts commit ab2846641bff895b9e82bfd8068c720e8132e297.
This fixes #9280
-rw-r--r-- | src/com/vaadin/terminal/gwt/client/JavaScriptConnectorHelper.java | 9 | ||||
-rw-r--r-- | tests/testbench/com/vaadin/tests/minitutorials/v7a3/complex_types_connector.js | 7 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/com/vaadin/terminal/gwt/client/JavaScriptConnectorHelper.java b/src/com/vaadin/terminal/gwt/client/JavaScriptConnectorHelper.java index 69b8e00603..47dd2df5b2 100644 --- a/src/com/vaadin/terminal/gwt/client/JavaScriptConnectorHelper.java +++ b/src/com/vaadin/terminal/gwt/client/JavaScriptConnectorHelper.java @@ -331,9 +331,9 @@ public class JavaScriptConnectorHelper { invokeCallback(getConnectorWrapper(), callbackName, arguments); } else { JavaScriptObject arguments = parametersJson.getJavaScriptObject(); - invokeJsRpc(rpcMap, iface, method, arguments, getConnectorWrapper()); + invokeJsRpc(rpcMap, iface, method, arguments); // Also invoke wildcard interface - invokeJsRpc(rpcMap, "", method, arguments, getConnectorWrapper()); + invokeJsRpc(rpcMap, "", method, arguments); } } @@ -344,8 +344,7 @@ public class JavaScriptConnectorHelper { }-*/; private static native void invokeJsRpc(JavaScriptObject rpcMap, - String interfaceName, String methodName, - JavaScriptObject parameters, JavaScriptObject connector) + String interfaceName, String methodName, JavaScriptObject parameters) /*-{ var targets = rpcMap[interfaceName]; if (!targets) { @@ -353,7 +352,7 @@ public class JavaScriptConnectorHelper { } for(var i = 0; i < targets.length; i++) { var target = targets[i]; - target[methodName].apply(connector, parameters); + target[methodName].apply(target, parameters); } }-*/; diff --git a/tests/testbench/com/vaadin/tests/minitutorials/v7a3/complex_types_connector.js b/tests/testbench/com/vaadin/tests/minitutorials/v7a3/complex_types_connector.js index 85dfb1369b..496afce432 100644 --- a/tests/testbench/com/vaadin/tests/minitutorials/v7a3/complex_types_connector.js +++ b/tests/testbench/com/vaadin/tests/minitutorials/v7a3/complex_types_connector.js @@ -1,8 +1,9 @@ window.com_vaadin_tests_minitutorials_v7a3_ComplexTypesComponent = function() { + var connectorId = this.getConnectorId(); + var element = this.getElement(); + this.registerRpc({ sendComplexTypes: function(list, stringMap, otherMap, connectorMap, bits, matrix, bean) { - var connectorId = this.getConnectorId(); - var message = 'list[2] = "' + list[2] + '"<br />'; message += 'stringMap.two = ' + stringMap.two + '<br />'; message += 'otherMap[1][1] = "' + otherMap[1][1] + '"<br />'; @@ -11,7 +12,7 @@ window.com_vaadin_tests_minitutorials_v7a3_ComplexTypesComponent = function() { message += 'matrix[0][1] = ' + matrix[0][1] + '<br />'; message += 'bean.bean.integer = ' + bean.bean.integer + '<br />'; - this.getElement().innerHTML = message; + element.innerHTML = message; } }); }
\ No newline at end of file |