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

IllegalStateException thrown when navigating to a different view with <redirect/> in a full page postback

    Details

      Description

      This problem was discovered by the JSR 329 TCK after upgrading to Mojarra 2.2.5 in the Liferay Faces 4.2.x branch (currently master).

      The patch for JAVASERVERFACES-3023 was applied to Mojarra 2.2.5 that included a call to ExternalContext.getResponseCharacterEncoding() in the following method of Mojarra's MultiViewHandler.java:

      @Override
          public String getRedirectURL(FacesContext context, String viewId, Map<String, List<String>> parameters, boolean includeViewParams) {
          ...
      }
      

      The problem is that javax.portlet.ActionResponse and javax.portlet.EventResponse do not implement the javax.portlet.MimeResponse interface and subsequently do not have a getResponseCharacterEncoding() that can be called. In fact the JSR 329 TCK tests this case in order to make sure that an IllegalStateException is thrown. Having said that, JSR 329 is written against JSF 1.2 and the aforementioned getRedirectURL method was introduced in JSF 2.0.

      Since the Mojarra patch is a reasonable one, it will be necessary to work-around this problem in Liferay Faces Bridge.

        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
                liferay-faces-2.1.4-ga5
                liferay-faces-2.2.4-ga5
                liferay-faces-3.0.4-legacy-ga5
                liferay-faces-3.0.4-ga5
                liferay-faces-3.1.4-ga5
                liferay-faces-3.2.4-ga5
                liferay-faces-4.2.5-ga6