summaryrefslogtreecommitdiffstats
path: root/WebContent
diff options
context:
space:
mode:
authorJohannes Dahlström <johannesd@vaadin.com>2012-06-13 17:46:09 +0300
committerJohannes Dahlström <johannesd@vaadin.com>2012-06-13 17:46:09 +0300
commit52d06a13b9e20cb752a21413e15adc250daa5e1c (patch)
treeac0e5878490d802960d9463354721ce1820b4aa8 /WebContent
parentde5fd8e0aefa0c43e2b0fe724102bca92eeaaf96 (diff)
parentadcf03c1b5f05b38cda25819b732745c1a4859fc (diff)
downloadvaadin-framework-52d06a13b9e20cb752a21413e15adc250daa5e1c.tar.gz
vaadin-framework-52d06a13b9e20cb752a21413e15adc250daa5e1c.zip
Merge remote-tracking branch 'origin/master'
Conflicts: src/com/vaadin/terminal/gwt/server/DragAndDropService.java
Diffstat (limited to 'WebContent')
-rw-r--r--WebContent/statictestfiles/jsconnector.js12
-rw-r--r--WebContent/statictestfiles/jsextension.js13
2 files changed, 25 insertions, 0 deletions
diff --git a/WebContent/statictestfiles/jsconnector.js b/WebContent/statictestfiles/jsconnector.js
new file mode 100644
index 0000000000..db8a065e86
--- /dev/null
+++ b/WebContent/statictestfiles/jsconnector.js
@@ -0,0 +1,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());
+ }
+} \ No newline at end of file
diff --git a/WebContent/statictestfiles/jsextension.js b/WebContent/statictestfiles/jsextension.js
new file mode 100644
index 0000000000..df67db8927
--- /dev/null
+++ b/WebContent/statictestfiles/jsextension.js
@@ -0,0 +1,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);
+ }
+ }
+ });
+} \ No newline at end of file