cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r366165 - /cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/coplet/adapter/impl/PortletAdapter.java
Date Thu, 05 Jan 2006 11:26:50 GMT
Author: cziegeler
Date: Thu Jan  5 03:25:58 2006
New Revision: 366165

URL: http://svn.apache.org/viewcvs?rev=366165&view=rev
Log:
Apply fix for portlet and window mode handling

Modified:
    cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/coplet/adapter/impl/PortletAdapter.java

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/coplet/adapter/impl/PortletAdapter.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/coplet/adapter/impl/PortletAdapter.java?rev=366165&r1=366164&r2=366165&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/coplet/adapter/impl/PortletAdapter.java
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/coplet/adapter/impl/PortletAdapter.java
Thu Jan  5 03:25:58 2006
@@ -341,25 +341,23 @@
         objectModel.put("portlet-response",  res);
         objectModel.put("portlet-request", req);        
 
+        // change portlet mode and window state
+        final InformationProviderService ips = (InformationProviderService)this.portletContainerEnvironment.getContainerService(InformationProviderService.class);
+        final DynamicInformationProvider dynProv = ips.getDynamicProvider(req);
+        final PortletActionProvider pap = dynProv.getPortletActionProvider(event.getPortletWindow());
+
+        final PortletMode mode = event.getPortletMode();
+        if ( mode != null ) {
+            pap.changePortletMode(mode);
+        }
+        final WindowState state = event.getWindowState();
+        if ( state != null ) {
+            pap.changePortletWindowState(state);
+        }
         if ( event.isAction() ) {
             // This means we can only have ONE portlet event per request!
             objectModel.put("portlet-event", event);
         } else {
-            DynamicInformationProvider dynProv;
-            InformationProviderService ips;
-            PortletActionProvider pap;
-
-            ips = (InformationProviderService)this.portletContainerEnvironment.getContainerService(InformationProviderService.class);
-            dynProv = ips.getDynamicProvider(req);
-            pap = dynProv.getPortletActionProvider(event.getPortletWindow());
-            final PortletMode mode = event.getPortletMode();
-            if ( mode != null ) {
-                pap.changePortletMode(mode);
-            }
-            final WindowState state = event.getWindowState();
-            if ( state != null ) {
-                pap.changePortletWindowState(state);
-            }
             ((PortletActionProviderImpl)pap).changeRenderParameters(event.getParameters());
         }
     }



Mime
View raw message