-
Type:
Bug
-
Status: Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: bridge-impl-2.0.0, bridge-impl-3.0.0, bridge-impl-4.0.0
-
Fix Version/s: bridge-impl-2.1.0, bridge-impl-3.1.0, bridge-impl-4.1.0
-
Component/s: Liferay Faces Bridge Impl / Demos / Tests
-
Labels:None
The com.liferay.faces.bridge.context.map.internal.RequestHeaderValuesMap class uses an "instanceof ResourceRequest" check in order to determine whether or not the "Faces-Request" header should be added. However, during a file upload, the ICEfaces ace:fileEntry component calls ExternalContext.setRequest(Object)) with an instance of a class that extends javax.portlet.PortletRequestWrapper (rather than javax.portlet.ResourceRequestWrapper).
Section 8.3 of the JSR 329/378 Spec describes how "javax.portlet.faces.phase" request attribute can be used to determine the current portlet request phase. The value of the attribute is defined by the javax.portlet.faces.Bridge enumeration:
public static enum PortletPhase { ACTION_PHASE, EVENT_PHASE, RENDER_PHASE, RESOURCE_PHASE, HEADER_PHASE }
In order to fix the problem with ace:fileEntry, the RequestHeaderValuesMap should also check for the "javax.portlet.faces.phase" attribute value equal to Bridge.PortletPhase.RESOURCE_PHASE.