You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2013/10/22 21:28:19 UTC

svn commit: r1534742 - /myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/webapp/LogoutActionListener.java

Author: lofwyr
Date: Tue Oct 22 19:28:18 2013
New Revision: 1534742

URL: http://svn.apache.org/r1534742
Log:
TOBAGO-633: Portlet support
 - working on portlet support

Modified:
    myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/webapp/LogoutActionListener.java

Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/webapp/LogoutActionListener.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/webapp/LogoutActionListener.java?rev=1534742&r1=1534741&r2=1534742&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/webapp/LogoutActionListener.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/webapp/LogoutActionListener.java Tue Oct 22 19:28:18 2013
@@ -19,6 +19,7 @@
 
 package org.apache.myfaces.tobago.webapp;
 
+import org.apache.myfaces.tobago.portlet.PortletUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -28,6 +29,7 @@ import javax.faces.context.FacesContext;
 import javax.faces.event.AbortProcessingException;
 import javax.faces.event.ActionEvent;
 import javax.faces.event.ActionListener;
+import javax.portlet.PortletSession;
 import javax.servlet.http.HttpSession;
 import java.io.IOException;
 
@@ -43,7 +45,9 @@ public class LogoutActionListener implem
       if (session instanceof HttpSession) {
         ((HttpSession) session).invalidate();
       }
-      // TODO: PortletRequest ??
+      if (PortletUtils.isPortletApiAvailable() && session instanceof PortletSession) {
+        ((PortletSession)session).invalidate();
+      }
     }
     String forward = externalContext.getRequestContextPath() + "/";
     try {