invokeCallback(getConnectorWrapper(), callbackName, arguments);
} else {
JavaScriptObject arguments = parametersJson.getJavaScriptObject();
- invokeJsRpc(rpcMap, iface, method, arguments);
+ invokeJsRpc(rpcMap, iface, method, arguments, getConnectorWrapper());
// Also invoke wildcard interface
- invokeJsRpc(rpcMap, "", method, arguments);
+ invokeJsRpc(rpcMap, "", method, arguments, getConnectorWrapper());
}
}
}-*/;
private static native void invokeJsRpc(JavaScriptObject rpcMap,
- String interfaceName, String methodName, JavaScriptObject parameters)
+ String interfaceName, String methodName,
+ JavaScriptObject parameters, JavaScriptObject connector)
/*-{
var targets = rpcMap[interfaceName];
if (!targets) {
}
for(var i = 0; i < targets.length; i++) {
var target = targets[i];
- target[methodName].apply(target, parameters);
+ target[methodName].apply(connector, parameters);
}
}-*/;
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 />';
message += 'matrix[0][1] = ' + matrix[0][1] + '<br />';
message += 'bean.bean.integer = ' + bean.bean.integer + '<br />';
- element.innerHTML = message;
+ this.getElement().innerHTML = message;
}
});
}
\ No newline at end of file