From: Leif Åstrand Date: Mon, 3 Sep 2012 12:21:39 +0000 (+0300) Subject: Don't return initied UI from LegacyApplication.createUIInstance (#9443) X-Git-Tag: 7.0.0.beta1~205^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=633f4141570f52fc78f4b0b48017c4c246cdf399;p=vaadin-framework.git Don't return initied UI from LegacyApplication.createUIInstance (#9443) --- diff --git a/server/src/com/vaadin/Application.java b/server/src/com/vaadin/Application.java index 2af3c6a59f..f368257ecd 100644 --- a/server/src/com/vaadin/Application.java +++ b/server/src/com/vaadin/Application.java @@ -235,6 +235,25 @@ public class Application implements Terminal.ErrorListener, Serializable { return mainWindow; } + /** + * This implementation simulates the way of finding a window for a + * request by extracting a window name from the requested path and + * passes that name to {@link #getWindow(String)}. + *

+ * {@inheritDoc} + */ + @Override + public UI getUIForRequest(WrappedRequest request) { + UI uiInstance = getUIInstance(request); + if (uiInstance.getUIId() == -1) { + // Not initialized -> Let go through createUIInstance to make it + // initialized + return null; + } else { + return uiInstance; + } + } + /** * This implementation simulates the way of finding a window for a * request by extracting a window name from the requested path and