aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src
diff options
context:
space:
mode:
authorJoonas Lehtinen <joonas.lehtinen@itmill.com>2009-11-06 09:41:07 +0000
committerJoonas Lehtinen <joonas.lehtinen@itmill.com>2009-11-06 09:41:07 +0000
commitbf0c1c36b2f121a20df7245e8af6ad1688c9830f (patch)
treeef146b12eeab6abc1b3f9dbf0f50bf5289cd566d /tests/src
parent6ac24bee8d8ee088512ac53fd12332bb127b9b41 (diff)
downloadvaadin-framework-bf0c1c36b2f121a20df7245e8af6ad1688c9830f.tar.gz
vaadin-framework-bf0c1c36b2f121a20df7245e8af6ad1688c9830f.zip
Merged implementation for #3589
svn changeset:9659/svn branch:6.2
Diffstat (limited to 'tests/src')
-rw-r--r--tests/src/com/vaadin/tests/tickets/Ticket3589.java39
1 files changed, 39 insertions, 0 deletions
diff --git a/tests/src/com/vaadin/tests/tickets/Ticket3589.java b/tests/src/com/vaadin/tests/tickets/Ticket3589.java
new file mode 100644
index 0000000000..5b7182eb5e
--- /dev/null
+++ b/tests/src/com/vaadin/tests/tickets/Ticket3589.java
@@ -0,0 +1,39 @@
+package com.vaadin.tests.tickets;
+
+import com.vaadin.Application;
+import com.vaadin.ui.Button;
+import com.vaadin.ui.Label;
+import com.vaadin.ui.TextField;
+import com.vaadin.ui.Window;
+import com.vaadin.ui.Button.ClickEvent;
+
+public class Ticket3589 extends Application {
+
+ @Override
+ public void init() {
+ final Window mainWindow = new Window("Test");
+ setMainWindow(mainWindow);
+
+ mainWindow.addComponent(new Button("alert('foo')",
+ new Button.ClickListener() {
+
+ public void buttonClick(ClickEvent event) {
+ mainWindow.executeJavaScript("alert('foo');");
+ }
+ }));
+
+ final Label label = new Label("Label");
+ final TextField textfield = new TextField("TestField");
+ mainWindow.addComponent(label);
+ mainWindow.addComponent(textfield);
+
+ final String script = "$1.style.backgroundColor='yellow';$2.style.borderColor='red';";
+ mainWindow.addComponent(new Button(script, new Button.ClickListener() {
+
+ public void buttonClick(ClickEvent event) {
+ mainWindow.executeJavaScript(script, label, textfield);
+ }
+ }));
+
+ }
+}