Author: mwringe
Date: 2010-10-15 09:48:57 -0400 (Fri, 15 Oct 2010)
New Revision: 4680
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletActionListener.java
Log:
GTNPORTAL-1552: Make sure the navigational state is added when handling actions and
serving resources. Make sure to not overwrite the navigational state unless a new value is
being provided.
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-10-15
13:31:39 UTC (rev 4679)
+++
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletActionListener.java 2010-10-15
13:48:57 UTC (rev 4680)
@@ -97,6 +97,13 @@
HttpServletRequest request = prcontext.getRequest();
setupPublicRenderParams(uiPortlet, request.getParameterMap());
+ // set the navigational state
+ String navState
=prcontext.getRequestParameter(ExoPortletInvocationContext.NAVIGATIONAL_STATE_PARAM_NAME);
+ if (navState != null)
+ {
+ uiPortlet.setNavigationalState(ParametersStateString.create(navState));
+ }
+
//
ActionInvocation actionInvocation = uiPortlet.create(ActionInvocation.class,
prcontext);
if (actionInvocation == null)
@@ -187,7 +194,10 @@
//
StateString navigationalState = navStateResponse.getNavigationalState();
- uiPortlet.setNavigationalState(navigationalState);
+ if (navigationalState != null)
+ {
+ uiPortlet.setNavigationalState(navigationalState);
+ }
// update the public render parameters with the changes from the invocation
setupPublicRenderParams(uiPortlet,
navStateResponse.getPublicNavigationalStateUpdates());
@@ -349,6 +359,13 @@
PortalRequestContext context =
(PortalRequestContext)event.getRequestContext();
HttpServletResponse response = context.getResponse();
+ //Set the NavigationalState
+ String navState =
context.getRequestParameter(ExoPortletInvocationContext.NAVIGATIONAL_STATE_PARAM_NAME);
+ if (navState != null)
+ {
+ uiPortlet.setNavigationalState(ParametersStateString.create(navState));
+ }
+
//
ResourceInvocation resourceInvocation =
uiPortlet.create(ResourceInvocation.class, context);
@@ -568,7 +585,11 @@
PortletMode mode = new PortletMode(getPortletModeOrDefault(navResponse));
setNextMode(uiPortlet, mode);
- uiPortlet.setNavigationalState(navResponse.getNavigationalState());
+ StateString navState = navResponse.getNavigationalState();
+ if (navState != null)
+ {
+ uiPortlet.setNavigationalState(navResponse.getNavigationalState());
+ }
setupPublicRenderParams(uiPortlet,
navResponse.getPublicNavigationalStateUpdates());
//TODO: (mwringe) add this to the UpdateNavigationStateResponse.Event class
instead of here
Show replies by date