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

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