From: Artur Signell Date: Sun, 13 May 2012 22:40:48 +0000 (+0300) Subject: Fix for URL generation in browser details request (#8785) X-Git-Tag: 7.0.0.alpha3~239 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=b52a8207073839958eedeaca5cd6c795eca76301;p=vaadin-framework.git Fix for URL generation in browser details request (#8785) --- diff --git a/src/com/vaadin/terminal/gwt/server/PortletCommunicationManager.java b/src/com/vaadin/terminal/gwt/server/PortletCommunicationManager.java index 1e2687982e..55f15da3d9 100644 --- a/src/com/vaadin/terminal/gwt/server/PortletCommunicationManager.java +++ b/src/com/vaadin/terminal/gwt/server/PortletCommunicationManager.java @@ -15,7 +15,6 @@ import javax.portlet.PortletRequest; import javax.portlet.PortletResponse; import javax.portlet.RenderRequest; import javax.portlet.RenderResponse; -import javax.portlet.ResourceResponse; import javax.portlet.ResourceURL; import com.vaadin.Application; @@ -85,8 +84,7 @@ public class PortletCommunicationManager extends AbstractCommunicationManager { @Override protected boolean handleApplicationRequest(WrappedRequest request, WrappedResponse response) throws IOException { - currentMimeResponse = (RenderResponse) ((WrappedPortletResponse) response) - .getPortletResponse(); + setCurrentMimeReponse(response); try { return super.handleApplicationRequest(request, response); } finally { @@ -94,16 +92,34 @@ public class PortletCommunicationManager extends AbstractCommunicationManager { } } + private void setCurrentMimeReponse(WrappedResponse response) { + PortletResponse portletResponse = ((WrappedPortletResponse) response) + .getPortletResponse(); + if (portletResponse instanceof MimeResponse) { + currentMimeResponse = (MimeResponse) portletResponse; + } + + } + @Override public void handleUidlRequest(WrappedRequest request, WrappedResponse response, Callback callback, Root root) throws IOException, InvalidUIDLSecurityKeyException { - currentMimeResponse = (ResourceResponse) ((WrappedPortletResponse) response) - .getPortletResponse(); + setCurrentMimeReponse(response); super.handleUidlRequest(request, response, callback, root); currentMimeResponse = null; } + @Override + public void handleBrowserDetailsRequest(WrappedRequest request, + WrappedResponse response, Application application) + throws IOException { + setCurrentMimeReponse(response); + super.handleBrowserDetailsRequest(request, response, application); + currentMimeResponse = null; + + } + private Map> ownerToNameToStreamVariable; @Override