Author: ate
Date: Fri Jun  8 18:02:40 2007
New Revision: 545679

URL: http://svn.apache.org/viewvc?view=rev&rev=545679
Log:
Fix for PB-59: render phase of portlet doesn't remove the attr RENDER_CONTEXT 
from the portlet session
See: https://issues.apache.org/jira/browse/PB-59

Modified:
    
portals/bridges/trunk/struts/src/java/org/apache/portals/bridges/struts/StrutsPortlet.java

Modified: 
portals/bridges/trunk/struts/src/java/org/apache/portals/bridges/struts/StrutsPortlet.java
URL: 
http://svn.apache.org/viewvc/portals/bridges/trunk/struts/src/java/org/apache/portals/bridges/struts/StrutsPortlet.java?view=diff&rev=545679&r1=545678&r2=545679
==============================================================================
--- 
portals/bridges/trunk/struts/src/java/org/apache/portals/bridges/struts/StrutsPortlet.java
 (original)
+++ 
portals/bridges/trunk/struts/src/java/org/apache/portals/bridges/struts/StrutsPortlet.java
 Fri Jun  8 18:02:40 2007
@@ -354,19 +354,21 @@
             String pageURL = getStrutsPageURL(request);
             
             if (pageURL == null)
+            {
                 path = defaultPage;
+            }
             else
             {
                 path = pageURL;
-                if ( !actionRequest )
-                {
-                    // restore possible render context from the session and 
store it as request attribute for the StrutsServlet to be able to find it
-                    StrutsPortletRenderContext renderContext = 
(StrutsPortletRenderContext)portletSession.getAttribute(RENDER_CONTEXT);
-                    if ( renderContext != null )
-                    {                        
-                        portletSession.removeAttribute(RENDER_CONTEXT);
-                        req.setAttribute(RENDER_CONTEXT, renderContext);
-                    }
+            }
+            if ( !actionRequest )
+            {
+                // restore possible render context from the session and store 
it as request attribute for the StrutsServlet to be able to find it
+                StrutsPortletRenderContext renderContext = 
(StrutsPortletRenderContext)portletSession.getAttribute(RENDER_CONTEXT);
+                if ( renderContext != null )
+                {                        
+                    portletSession.removeAttribute(RENDER_CONTEXT);
+                    req.setAttribute(RENDER_CONTEXT, renderContext);
                 }
             }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to