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

Support ExternalContext.responseReset()

    Details

      Description

      The FacesBridge must follow the requirements in the JSF 2.2 JavaDoc. However, rather than call HttpServletResponse.reset() the FacesBridge must call MimeResponse.reset(). It is only valid to call this method during the HEADER_PHASE, RENDER_PHASE, and RESOURCE_PHASE of the portlet lifecycle.

      TCK: In the HEADER_PHASE call ExternalContext.setResponseHeader("headerPhase", "true"). In order to write something to the response, make sure that the header phase dispatches to a JSF view that produces markup. In the RENDER_PHASE, call ExternalContext.responseReset() followed by manually writing something to the response with ExternalContext.getResponseOutputWriter().write("<span>response was reset</span>"). Then verify that the header is not present in the page via Javascript and that the only markup for the portlet is the span. It is not possible to test during the RESOURCE_PHASE since the jsf.js client-side library is in control of the XHR dispatched via f:ajax.

        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:

                Packages

                Version Package
                facesbridge-tck-5.0.0
                facesbridge-spec-5.0.0