portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject svn commit: r1610068 - /portals/jetspeed-2/portal/branches/JETSPEED-BRANCH-2.2.2-POST-RELEASE/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/PageHistoryValve.java
Date Sat, 12 Jul 2014 22:07:35 GMT
Author: taylor
Date: Sat Jul 12 22:07:35 2014
New Revision: 1610068

URL: http://svn.apache.org/r1610068
Log:
JS2-1299: couldn't get this work perfectly as it was breaking action pipeline. Instead providing
alternative request parameter to clear state.

Modified:
    portals/jetspeed-2/portal/branches/JETSPEED-BRANCH-2.2.2-POST-RELEASE/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/PageHistoryValve.java

Modified: portals/jetspeed-2/portal/branches/JETSPEED-BRANCH-2.2.2-POST-RELEASE/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/PageHistoryValve.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JETSPEED-BRANCH-2.2.2-POST-RELEASE/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/PageHistoryValve.java?rev=1610068&r1=1610067&r2=1610068&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JETSPEED-BRANCH-2.2.2-POST-RELEASE/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/PageHistoryValve.java
(original)
+++ portals/jetspeed-2/portal/branches/JETSPEED-BRANCH-2.2.2-POST-RELEASE/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/PageHistoryValve.java
Sat Jul 12 22:07:35 2014
@@ -21,13 +21,12 @@ import org.apache.jetspeed.pipeline.Pipe
 import org.apache.jetspeed.pipeline.valve.AbstractValve;
 import org.apache.jetspeed.pipeline.valve.ValveContext;
 import org.apache.jetspeed.request.RequestContext;
-
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
  * <p>
- * Valve basically mantains the page navigation history by maintaining a previous page id
in the session.
+ * Valve basically maintains the page navigation history by maintaining a previous page id
in the session.
  * Required by JS2-806
  * </p>
  * 
@@ -78,12 +77,16 @@ public class PageHistoryValve extends Ab
                 }
                 else
                 {
-                    
                     if (prevPageId.equalsIgnoreCase(curPageId))
                     {
-                        if (log.isDebugEnabled())
-                        {
-                            log.debug("Previous page id is same as current page id, not clearing
page state");
+                        if (request.getRequestParameter(REQUEST_CLEAR_PORTLETS_MODE_AND_WINDOWSTATE_KEY)
!= null) {
+                            request.setSessionAttribute(SESSION_PREVIOUS_PAGEID_KEY, curPageId);
+                            request.setAttribute(REQUEST_CLEAR_PORTLETS_MODE_AND_WINDOWSTATE_KEY,
Boolean.TRUE);
+                        }
+                        else {
+                            if (log.isDebugEnabled()) {
+                                log.debug("Previous page id is same as current page id, not
clearing page state");
+                            }
                         }
                     }
                     else



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message