[gatein-commits] gatein SVN: r4968 - portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application.

do-not-reply at jboss.org do-not-reply at jboss.org
Mon Nov 8 09:17:49 EST 2010


Author: mwringe
Date: 2010-11-08 09:17:48 -0500 (Mon, 08 Nov 2010)
New Revision: 4968

Modified:
   portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletActionListener.java
Log:
GTNPORTAL-1638: if the UpdateNavigationalStateResponse returns null values for WindowState or PortletMode then use the current values, not default values. The UpdateNavigationalStateResponse should only have values when the properties change.

Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletActionListener.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletActionListener.java	2010-11-08 10:41:13 UTC (rev 4967)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletActionListener.java	2010-11-08 14:17:48 UTC (rev 4968)
@@ -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