]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fixes broken request listeners (#12056)
authorArtur Signell <artur@vaadin.com>
Thu, 13 Jun 2013 19:50:29 +0000 (22:50 +0300)
committerVaadin Code Review <review@vaadin.com>
Fri, 14 Jun 2013 06:15:36 +0000 (06:15 +0000)
Change-Id: I432d901ea3a0d0e3013c045a2048489ee0a41695

server/src/com/vaadin/server/communication/PortletListenerNotifier.java

index 5c03a6f4dc4ed5507a2074ec95de7a50b88ae915..34e007c7707b7904df7319efc2c69c75f301163a 100644 (file)
@@ -59,9 +59,9 @@ public class PortletListenerNotifier extends SynchronizedRequestHandler {
             VaadinRequest request, VaadinResponse response) throws IOException {
 
         VaadinPortletSession sess = (VaadinPortletSession) session;
-        PortletRequest req = ((VaadinPortletRequest) request)
+        PortletRequest portletRequest = ((VaadinPortletRequest) request)
                 .getPortletRequest();
-        PortletResponse resp = ((VaadinPortletResponse) response)
+        PortletResponse portletResponse = ((VaadinPortletResponse) response)
                 .getPortletResponse();
 
         // Finds the right UI
@@ -70,18 +70,19 @@ public class PortletListenerNotifier extends SynchronizedRequestHandler {
             uI = session.getService().findUI(request);
         }
 
-        if (request instanceof RenderRequest) {
-            sess.firePortletRenderRequest(uI, (RenderRequest) req,
-                    (RenderResponse) resp);
-        } else if (request instanceof ActionRequest) {
-            sess.firePortletActionRequest(uI, (ActionRequest) req,
-                    (ActionResponse) resp);
-        } else if (request instanceof EventRequest) {
-            sess.firePortletEventRequest(uI, (EventRequest) req,
-                    (EventResponse) resp);
-        } else if (request instanceof ResourceRequest) {
-            sess.firePortletResourceRequest(uI, (ResourceRequest) req,
-                    (ResourceResponse) resp);
+        if (portletRequest instanceof RenderRequest) {
+            sess.firePortletRenderRequest(uI, (RenderRequest) portletRequest,
+                    (RenderResponse) portletResponse);
+        } else if (portletRequest instanceof ActionRequest) {
+            sess.firePortletActionRequest(uI, (ActionRequest) portletRequest,
+                    (ActionResponse) portletResponse);
+        } else if (portletRequest instanceof EventRequest) {
+            sess.firePortletEventRequest(uI, (EventRequest) portletRequest,
+                    (EventResponse) portletResponse);
+        } else if (portletRequest instanceof ResourceRequest) {
+            sess.firePortletResourceRequest(uI,
+                    (ResourceRequest) portletRequest,
+                    (ResourceResponse) portletResponse);
         }
 
         return false;