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

Support namespaced parameters in FacesBridge TCK TestPage155 (getRequestParameterNamesCoreTest)

    Details

      Description

      Although JSR 378 targets JSF 2.2 and not JSF 2.3, the Liferay Faces team is already doing integration work for JSF 2.3. In order to minimize diffs in the TCK source across branches, it is convenient to consider this simple change at this time.

      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

          Hide
          kyle.stiemann Kyle Stiemann added a comment -

          +1

          Show
          kyle.stiemann Kyle Stiemann added a comment - +1
          Hide
          vernon.singleton Vernon Singleton added a comment -

          +1

          Show
          vernon.singleton Vernon Singleton added a comment - +1
          Hide
          kfyten Ken Fyten added a comment -

          +1

          Show
          kfyten Ken Fyten added a comment - +1
          Hide
          juan.gonzalez Juan Gonzalez (Inactive) added a comment -

          +1

          Show
          juan.gonzalez Juan Gonzalez (Inactive) added a comment - +1

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development

                  Subcomponents