Uploaded image for project: 'PUBLIC - Liferay Faces'
  1. PUBLIC - Liferay Faces
  2. FACES-3011

RequestHeaderValuesMap does not add the "Faces-Request" header during an ICEfaces file upload with ace:fileEntry

    Details

      Description

      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:

      Bridge.java
      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.

        Attachments

          Activity

            People

            Assignee:
            neil.griffin Neil Griffin
            Reporter:
            neil.griffin Neil Griffin
            Participants of an Issue:
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Packages

                Version Package
                bridge-impl-2.1.0
                bridge-impl-3.1.0
                bridge-impl-4.1.0