From e033fcda3537290a2db1b33ab5e7d5264639f1bb Mon Sep 17 00:00:00 2001 From: Leif Åstrand Date: Tue, 8 Apr 2014 16:56:50 +0300 Subject: Always initialize WebBrowser for new sessions (#13571) Change-Id: I3918498d63032f6b507b52634df5b41470363e15 --- server/src/com/vaadin/server/BootstrapHandler.java | 4 ---- server/src/com/vaadin/server/VaadinService.java | 3 +++ server/src/com/vaadin/server/communication/UIInitHandler.java | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) (limited to 'server') diff --git a/server/src/com/vaadin/server/BootstrapHandler.java b/server/src/com/vaadin/server/BootstrapHandler.java index 0a4949ffa7..60b4459d2a 100644 --- a/server/src/com/vaadin/server/BootstrapHandler.java +++ b/server/src/com/vaadin/server/BootstrapHandler.java @@ -155,10 +155,6 @@ public abstract class BootstrapHandler extends SynchronizedRequestHandler { } try { - // Update WebBrowser here only to make WebBrowser information - // available in init for LegacyApplications - session.getBrowser().updateRequestDetails(request); - List uiProviders = session.getUIProviders(); UIClassSelectionEvent classSelectionEvent = new UIClassSelectionEvent( diff --git a/server/src/com/vaadin/server/VaadinService.java b/server/src/com/vaadin/server/VaadinService.java index eda794438f..b26097a247 100644 --- a/server/src/com/vaadin/server/VaadinService.java +++ b/server/src/com/vaadin/server/VaadinService.java @@ -735,6 +735,9 @@ public abstract class VaadinService implements Serializable { session.storeInSession(this, request.getWrappedSession()); + // Initial WebBrowser data comes from the request + session.getBrowser().updateRequestDetails(request); + // Initial locale comes from the request Locale locale = request.getLocale(); session.setLocale(locale); diff --git a/server/src/com/vaadin/server/communication/UIInitHandler.java b/server/src/com/vaadin/server/communication/UIInitHandler.java index d4b0bc709f..9f299d9427 100644 --- a/server/src/com/vaadin/server/communication/UIInitHandler.java +++ b/server/src/com/vaadin/server/communication/UIInitHandler.java @@ -67,7 +67,7 @@ public abstract class UIInitHandler extends SynchronizedRequestHandler { try { assert UI.getCurrent() == null; - // Set browser information from the request + // Update browser information from the request session.getBrowser().updateRequestDetails(request); UI uI = getBrowserDetailsUI(request, session); -- cgit v1.2.3