[gatein-commits] gatein SVN: r5059 - epp/portal/branches/EPP_5_1_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/application.

do-not-reply at jboss.org do-not-reply at jboss.org
Fri Nov 12 03:56:05 EST 2010


Author: thomas.heute at jboss.com
Date: 2010-11-12 03:56:05 -0500 (Fri, 12 Nov 2010)
New Revision: 5059

Modified:
   epp/portal/branches/EPP_5_1_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletActionListener.java
Log:
JBEPP-626: UIPortletActionListener doesn't handle UpdateNavigationalResponses properly


Modified: epp/portal/branches/EPP_5_1_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletActionListener.java
===================================================================
--- epp/portal/branches/EPP_5_1_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletActionListener.java	2010-11-12 08:37:26 UTC (rev 5058)
+++ epp/portal/branches/EPP_5_1_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletActionListener.java	2010-11-12 08:56:05 UTC (rev 5059)
@@ -183,13 +183,23 @@
           * If the current node is displaying a usual layout page, also tells the
           * page which portlet to render or not when the state is maximized
           */
-         WindowState state = new WindowState(getWindowStateOrDefault(navStateResponse));
-         setNextState(uiPortlet, state);
+         // Note: we should only update the WindowState if the UpdateNavigationalStateResponse.getWindowState is not null,
+         // otherwise it means the WindowState has not changed and we should use the current value.
+         if (navStateResponse.getWindowState() != null)
+         {
+            WindowState state = new WindowState(getWindowStateOrDefault(navStateResponse));
+            setNextState(uiPortlet, state);
+         }
 
          // update the portlet with the next mode to display
-         PortletMode mode = new PortletMode(getPortletModeOrDefault(navStateResponse));
-         setNextMode(uiPortlet, mode);
-
+         // Note: we should only update the Mode if the UpdateNavigationalStateResponse.getMode is not null,
+         // otherwise it means the mode has not changed and we should use the current value.
+         if (navStateResponse.getMode() != null)
+         {
+            PortletMode mode = new PortletMode(getPortletModeOrDefault(navStateResponse));
+            setNextMode(uiPortlet, mode);
+         }
+         
          /*
           * Cache the render parameters in the UI portlet component to handle the
           * navigational state. Each time a portlet is rendered (except using



More information about the gatein-commits mailing list