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

Deprecate ExtFacesContext and LiferayFacesContext in favor of FacesContextHelperUtil, PortletHelperUtil, and LiferayPortletHelperUtil

    Details

      Description

      As described in the forum thread titled Why does LiferayFacesContext extend FacesContext?, the original intent of LiferayFacesContext provide a convenient way for developers to get a single contextual object that would enable developers to access JSF, Portlet, and Liferay operations associated with the request.

      In retrospect, having LiferayFacesContext and ExtFacesContext extend FacesContext caused confusion since LiferayFacesContext.getInstance() returned an application singleton whereas LiferayFacesContext.getCurrentInstance() returned the ThreadLocal FacesContext singleton.

      In order to remedy this problem, the ExtFacesContext and LiferayFacesContext classes will be deprecated.

      As a replacement, the following classes will be created in liferay-faces-util:

      com.liferay.faces.util.context.FacesContextHelperFactory
      com.liferay.faces.util.context.FacesContextHelperUtil
      com.liferay.faces.util.context.FacesContextHelperWrapper
      

      Also as a replacement, the following classes will be created in liferay-faces-portal:

      com.liferay.faces.portal.context.PortletHelperFactory
      com.liferay.faces.portal.context.PortletHelperUtil
      com.liferay.faces.portal.context.PortletHelperWrapper
      com.liferay.faces.portal.context.LiferayPortletHelperFactory
      com.liferay.faces.portal.context.LiferayPortletHelperUtil
      com.liferay.faces.portal.context.LiferayPortletHelperWrapper
      

      This will enable the developer to utilize the standard JSF factory delegation chain pattern to decorate FacesContextHelper, PortletHelper, and LiferayPortletHelper. In addition the "Util" classes will provide static convenience methods that call through to the underlying singletons returned by the respective factories.

        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
                portal-1.0.0
                portal-2.0.0
                portal-3.0.0
                util-1.0.0
                util-2.0.0
                util-3.0.0