From 087756f1a6472af100686fdfebd7aa273faa0059 Mon Sep 17 00:00:00 2001 From: Johannes Dahlström Date: Thu, 2 May 2013 13:58:36 +0300 Subject: Allow setting push mode in UI.init (#11739) Change-Id: Ied24bc42a25800033351fcbacdc5fc5e0be8eda1 --- server/src/com/vaadin/server/communication/UIInitHandler.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'server/src') 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 -- cgit v1.2.3