You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by mf...@apache.org on 2011/10/21 01:23:33 UTC
svn commit: r1187128 -
/myfaces/portlet-bridge/core/branches/2.0.0-branch/impl/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgeImpl.java
Author: mfreedman
Date: Thu Oct 20 23:23:32 2011
New Revision: 1187128
URL: http://svn.apache.org/viewvc?rev=1187128&view=rev
Log:
PORTLETBRIDGE-221: Add explicit exclusions for trinidad in 329 branch
Modified:
myfaces/portlet-bridge/core/branches/2.0.0-branch/impl/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgeImpl.java
Modified: myfaces/portlet-bridge/core/branches/2.0.0-branch/impl/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgeImpl.java
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/branches/2.0.0-branch/impl/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgeImpl.java?rev=1187128&r1=1187127&r2=1187128&view=diff
==============================================================================
--- myfaces/portlet-bridge/core/branches/2.0.0-branch/impl/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgeImpl.java (original)
+++ myfaces/portlet-bridge/core/branches/2.0.0-branch/impl/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgeImpl.java Thu Oct 20 23:23:32 2011
@@ -1059,7 +1059,10 @@ public class BridgeImpl
// However, if this is a resource request then we also update the full scope
context.getExternalContext().getRequestMap().put(SCOPE_VIEW_KEY, getScopeViewKey(context.getExternalContext()));
saveFacesMessageState(context);
- saveBridgeRequestScopeData(context, scopeId, preExistingAttributes, BridgeUtil.getPortletRequestPhase() == Bridge.PortletPhase.RESOURCE_PHASE);
+ // JIRA PORTLETBRIDGE-221: changed last parameter to already be true -- i.e. merge existing scope
+ // so we can merge back any adf/trinidad attrs that existed prior to this request into the scope. Note:
+ // the code used to only do this for RESOURCE_REQUESTS.
+ saveBridgeRequestScopeData(context, scopeId, preExistingAttributes, true);
updateViewInfo(context, scopeId);
}
@@ -2036,6 +2039,15 @@ public class BridgeImpl
Map.Entry<String, Object> e = i.next();
if (!o.containsKey(e.getKey()))
{
+ // Added as part of fix for JIRA PORTLETBRIDGE-221
+ // Needed to offset code that excludes all adf/trinidad attrs from a render request -- i.e. herein we add
+ // back those attrs that already existed before the request happened. -- We limit only adding back
+ // the trinidad/adf ones to preserve current behavior for others (when no merge ever happened)
+ if (BridgeUtil.getPortletRequestPhase() == Bridge.PortletPhase.RENDER_PHASE &&
+ !(e.getKey().startsWith("org.apache.myfaces.trinidad") || e.getKey().startsWith("oracle.adf")))
+ {
+ continue;
+ }
o.put(e.getKey(), e.getValue());
}
}
@@ -2103,7 +2115,12 @@ public class BridgeImpl
isInNamespace(s, "org.apache.myfaces.portlet.faces.") ||
// our ExternalContext uses this prefix internally to append to url which might
// contain another '.' -- so exclude all that are prefixed with this
- s.startsWith("org.apache.myfaces.portlet.faces.context.");
+ s.startsWith("org.apache.myfaces.portlet.faces.context.") ||
+ // JIRA PORTLETBRIDGE-221: Added just for the Oracle branch to all exclude ADF and Trinidad attrs
+ // added during render requests -- code exists at the point of putting the scope to add\
+ // back those adf/trinidad attrs that existed before this request.
+ BridgeUtil.getPortletRequestPhase() == Bridge.PortletPhase.RENDER_PHASE &&
+ (s.startsWith("org.apache.myfaces.trinidad") || s.startsWith("oracle.adf"));
}
}