diff options
Diffstat (limited to 'server/src/com')
-rw-r--r-- | server/src/com/vaadin/server/communication/UIInitHandler.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/server/src/com/vaadin/server/communication/UIInitHandler.java b/server/src/com/vaadin/server/communication/UIInitHandler.java index 97aaa6bd74..e4b5360b49 100644 --- a/server/src/com/vaadin/server/communication/UIInitHandler.java +++ b/server/src/com/vaadin/server/communication/UIInitHandler.java @@ -204,11 +204,6 @@ public abstract class UIInitHandler extends SynchronizedRequestHandler { ui.setSession(session); } - // Set thread local here so it is available in init - UI.setCurrent(ui); - - ui.doInit(request, uiId.intValue()); - PushMode pushMode = provider.getPushMode(event); if (pushMode == null) { pushMode = session.getService().getDeploymentConfiguration() @@ -216,6 +211,11 @@ public abstract class UIInitHandler extends SynchronizedRequestHandler { } ui.setPushMode(pushMode); + // Set thread local here so it is available in init + UI.setCurrent(ui); + + ui.doInit(request, uiId.intValue()); + session.addUI(ui); // Remember if it should be remembered |