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

Support ExternalContext.encodePartialActionURL(String url)

    Details

      Description

      The ExternalContext.encodePartialActionURL(String url) method was added as of JSF 2.0.

      The FacesBridge must follow the requirements in the JSF 2.2 JavaDoc which includes language for the portlet environment use-case:

      Return the input URL, after performing any rewriting needed to ensure that it can be used in a partial page submission (ajax request) to correctly identify an addressable action in the current application.

      See encodeActionURL(java.lang.String) for the required specification of how to encode the ClientWindow.

      Portlet:Returns an encoded URL that, upon HTTP POST, will invoke the RESOURCE_PHASE of the portlet lifecycle.

      In addition, the encoded URL must contain "_jsfBridgeAjax=true" as a parameter so that the FacesBridge will invoke the JSF lifecycle with partial-request processing (see FACES-3036).

      TCK: encodePartialActionURLTest (bridge-tck-main-portlet)

      • Default View: tests/resourceAjaxResult.xhtml
      • Submit the h:form via Ajax by clicking on the h:commandButton with f:ajax child
      • Test verifies that the JSF lifecycle is executing in the RESOURCE_PHASE of the portlet lifecycle and that the _jsfBridgeAjax parameter has a value of "true".

      TCK: encodePartialActionClientWindowTest (bridge-tck-flows-portlet)

      Develop the bridge-tck-flows-portlet with the following in web.xml:

      web.xml
      <context-param>
          <param-name>javax.faces.CLIENT_WINDOW_MODE</param-name>
          <param-value>url</param-value>
      </context-param>
      
      • Default View: tests/resourceAjaxResult.xhtml
      • Submit the h:form via Ajax by clicking on the h:commandButton with f:ajax child
      • Test verifies that the JSF lifecycle is executing in the RESOURCE_PHASE of the portlet lifecycle, that the _jsfBridgeAjax parameter has a value of "true", and that the "jfwid" parameter has a non-null value.

        Attachments

          Issue Links

            Activity

              People

              • 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
                  bridge-impl-5.0.0