summaryrefslogtreecommitdiffstats
path: root/WebContent/statictestfiles/jsconnector.js
blob: db8a065e86c423ad54d8ea85f0226fa605cb1040 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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.onStateChange = function() {
		console.log('state change:', this.getState());
	}
}