portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r931907 - /portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/state/impl/AbstractNavigationalState.java
Date Thu, 08 Apr 2010 12:27:20 GMT
Author: ate
Date: Thu Apr  8 12:27:19 2010
New Revision: 931907

URL: http://svn.apache.org/viewvc?rev=931907&view=rev
Log:
Fix for JS2-1182:  PublicRenderParameters access fails for portlets without PortletWindowRequestNavigationalState
See: https://issues.apache.org/jira/browse/JS2-1182

Modified:
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/state/impl/AbstractNavigationalState.java

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/state/impl/AbstractNavigationalState.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/state/impl/AbstractNavigationalState.java?rev=931907&r1=931906&r2=931907&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/state/impl/AbstractNavigationalState.java
(original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/state/impl/AbstractNavigationalState.java
Thu Apr  8 12:27:19 2010
@@ -578,6 +578,16 @@ public abstract class AbstractNavigation
     public Map<String, String[]> getPublicRenderParameterMap(PortletWindow window)
     {
         PortletWindowRequestNavigationalState state = requestStates.getPortletWindowNavigationalState(window.getId().toString());
+        if (state == null && requestStates.getPublicRenderParametersMap() != null
&& window.isValid() && window.getPortletDefinition().getSupportedPublicRenderParameters()
!= null)
+        {
+        	// Window doesn't have any state of its own yet but potentially could require access
to the public render parameters
+        	// This could also be an instantly created PortletWindow for which we also need
to support access to the public render parameters
+        	// need to create and inject a new state object on the fly to be able to resolve
this
+            state = new PortletWindowRequestNavigationalState(window.getWindowId());
+            state.setPortletDefinition(window.getPortletDefinition());
+            state.resolveActionScopedRequestAttributes();
+            requestStates.addPortletWindowNavigationalState(window.getWindowId(), state);
+        }
         if (state != null)
         {
             return requestStates.getPublicRenderParametersMap(window.getWindowId());



---------------------------------------------------------------------
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