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

Support namespaced parameters in FacesBridge TCK TestPage155 (getRequestParameterNamesCoreTest)

    Details

      Description

      Due to changes made in JSF 2.3 issue JAVASERVERFACES_SPEC_PUBLIC-790, parameters such as "javax.faces.ViewState" are always namespaced in a portlet environment using the following prefix:

      FacesContext facesContext = FacesContext.getCurrentInstance();
      ExternalContext externalContext = facesContext.getExternalContext();
      String namespace = externalContext.encodeNamespace("");
      char separatorChar = UINamingContainer.getSeparatorChar(facesContext);
      String prefix = namespace + separatorChar;
      

      FacesBridge TCK TestPage155 (getRequestParameterNamesCoreTest) assumes that "javax.faces.ViewState" is never namespaced and needs to be fortified to support namespaced parameters.

      This fix is quite simple and should be backported to older branches of the bridge, since namespaced parameters is also supported in a "com.sun.faces" vendor specific way with Mojarra:

      --- a/tck/bridge-tck-main-portlet/src/main/java/com/liferay/faces/bridge/tck/tests/chapter_6/section_6_1_3_1/Tests.java
      +++ b/tck/bridge-tck-main-portlet/src/main/java/com/liferay/faces/bridge/tck/tests/chapter_6/section_6_1_3_1/Tests.java
      @@ -4251 +4251 @@ public class Tests extends Object {
      -                                   if (name.equals(requestNamesEnum.nextElement())) {
      +                                 if (name.contains(requestNamesEnum.nextElement())) {
      @@ -4299 +4299 @@ public class Tests extends Object {
      -                           if (s.equals(ResponseStateManager.VIEW_STATE_PARAM)) {
      +                         if (s.contains(ResponseStateManager.VIEW_STATE_PARAM)) {
      

        Issue Links

          Activity

          There are no comments yet on this issue.

            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:

                Development

                  Subcomponents