summaryrefslogtreecommitdiffstats
path: root/src/com/vaadin/ui/Root.java
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2012-06-11 21:52:26 +0300
committerLeif Åstrand <leif@vaadin.com>2012-06-11 21:52:26 +0300
commit9b757f047fc8450d8a7d3d7aa5a7b7e43bfa1312 (patch)
treee3814cb6b78cb90570f2b9c31978728e44c7ec33 /src/com/vaadin/ui/Root.java
parent24e3409e6ff117ff954f36a9c9378690c76634f8 (diff)
downloadvaadin-framework-9b757f047fc8450d8a7d3d7aa5a7b7e43bfa1312.tar.gz
vaadin-framework-9b757f047fc8450d8a7d3d7aa5a7b7e43bfa1312.zip
Initial javascript callback support (#6730)
Diffstat (limited to 'src/com/vaadin/ui/Root.java')
-rw-r--r--src/com/vaadin/ui/Root.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/com/vaadin/ui/Root.java b/src/com/vaadin/ui/Root.java
index 8792bf1912..9814084cbc 100644
--- a/src/com/vaadin/ui/Root.java
+++ b/src/com/vaadin/ui/Root.java
@@ -408,6 +408,8 @@ public abstract class Root extends AbstractComponentContainer implements
private DirtyConnectorTracker dirtyConnectorTracker = new DirtyConnectorTracker(
this);
+ private JavascriptManager javascriptManager;
+
private RootServerRpc rpc = new RootServerRpc() {
public void click(MouseEventDetails mouseDetails) {
fireEvent(new ClickEvent(Root.this, mouseDetails));
@@ -1590,4 +1592,14 @@ public abstract class Root extends AbstractComponentContainer implements
return dirtyConnectorTracker;
}
+ public JavascriptManager getJavascriptManager() {
+ if (javascriptManager == null) {
+ // Create and attach on first use
+ javascriptManager = new JavascriptManager();
+ addExtension(javascriptManager);
+ }
+
+ return javascriptManager;
+ }
+
}