aboutsummaryrefslogtreecommitdiffstats
path: root/WebContent/statictestfiles/jsconnector.js
blob: e08c748aa6e350dd83895bc360bc5a5ee932559b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
window.com_vaadin_tests_components_javascriptcomponent_BasicJavaScriptComponent_ExampleWidget = function() {
	var connector = this;
	
	var rootElement = connector.getWidgetElement();
	rootElement.innerHTML = 'Hello world!';
	rootElement.onclick = function() {
		connector.getRpcProxyFunction("com.vaadin.tests.components.javascriptcomponent.BasicJavaScriptComponent$ExampleClickRpc", "onClick")("message");
		connector.onclick("another message");
	}
	connector.onStateChange = function() {
		console.log('state change:', this.getState());
	}
}