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

Namespaced ViewState and other parameters cannot be obtained via portletRequest.getParameter()



      Due to the changes made for JAVASERVERFACES-SPEC-PUBLIC-790, the java.faces.ViewState and javax.faces.ClientWindow parameters now include a JSF separator character (usually a colon ":") when submitted to the server. This may cause backwards compatibility issues when developers attempt to do something like what we do in the showcase ActionURLDemoPortlet:

      String viewState = actionRequest.getParameter(ResponseStateManager.VIEW_STATE_PARAM);
      if (viewState == null) {
          /* ... */

      If namespaced parameters are turned on (which will be the default in JSF 2.3 + Portlet 3.0), this code will never be able to retrieve the view state. This is because the code used to retrieve parameters first checks if it can obtain the value via the passed String (paramName). If not, it attempts to prepend the namespace to the string and retrieve the value (namespace + paramName). This will not work for the view state and client window params in JSF 2.3 (namespace + seperatorChar + paramName). We need to consider whether we'll fix this in the Bridge by implementing a portlet filter which obtains the value correctly, or consider leaving it as is (a minor breaking change).


          Issue Links



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


                • Created:


                  Version Package