aboutsummaryrefslogtreecommitdiffstats
path: root/WebContent/statictestfiles/jsextension.js
blob: df67db89275023b5430a44e71405a4c565a3d4b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
window.com_vaadin_tests_features_SimpleJavascriptExtensionTest_SimpleJavascriptExtension = function() {
	var state = this.getState();
	var greetBack = this.getRpcProxyFunction('com.vaadin.tests.features.SimpleJavascriptExtensionTest$SimpleJavascriptExtensionServerRpc', 'greet');

	this.registerRpc("com.vaadin.tests.features.SimpleJavascriptExtensionTest.SimpleJavascriptExtensionClientRpc", {
		'greet': function(greeting) {
			var response = window.prompt(state.prefix + greeting);
			if (response !== null) {
				greetBack(response);
			}
		}
	});
}