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

Require the FacesBridge to provide @Alternative CDI producers for Portlet 3.0 @Named beans that can be wrapped by factories

    Details

      Description

      Section 20.3.1 of the Portlet 3.0 Specification titled "Portlet Request Scoped Beans" provides a table that lists all of the @Named @PortletRequestScoped CDI beans and their corresponding EL names. Since the FacesBridge provides factories that potentially decorate these @PortletRequestScoped beans, the FacesBridge should be required to provide @Alternative CDI producers.

      Example from the FacesBridge RI:

      BridgePortletConfigProducer.java
      @Alternative
      @Dependent
      @Priority(Interceptor.Priority.APPLICATION + 10)
      public class BridgePortletConfigProducer {
      
      	@Named(value = "portletConfig")
      	@PortletRequestScoped
      	@Produces
      	public PortletConfig getPortletConfig() {
      		return RequestMapUtil.getPortletConfig(FacesContext.getCurrentInstance());
      	}
      }
      

      The following is a list of beans that would require @Alternative CDI producers:

      EL Name FacesBridge Factory Related Issue
      actionParams BridgePortletRequestFactory FACES-2679
      actionRequest BridgePortletRequestFactory FACES-2679
      actionResponse BridgePortletResponseFactory FACES-2679
      clientDataRequest BridgePortletRequestFactory FACES-2679
      contextPath BridgePortletRequestFactory FACES-2679
      cookies BridgePortletRequestFactory FACES-2679
      eventRequest BridgePortletRequestFactory FACES-2679
      eventResponse BridgePortletResponseFactory FACES-2679
      headerRequest BridgePortletRequestFactory FACES-2679
      headerResponse BridgePortletResponseFactory FACES-2679
      locales BridgePortletRequestFactory FACES-2679
      mimeResponse BridgePortletResponseFactory FACES-2679
      mutableRenderParams BridgePortletRequestFactory FACES-2679
      namespace BridgePortletResponseFactory FACES-2679
      portletConfig BridgePortletConfigFactory FACES-2684
      portletContext BridgePortletConfigFactory FACES-2684
      portletMode BridgePortletRequestFactory FACES-2679
      portletName BridgePortletConfigFactory FACES-2684
      portletPreferences BridgePortletRequestFactory FACES-2679
      portletRequest BridgePortletRequestFactory FACES-2679
      portletResponse BridgePortletResponseFactory FACES-2679
      portletSession BridgePortletRequestFactory FACES-2679
      renderParams BridgePortletRequestFactory FACES-2679
      renderRequest BridgePortletRequestFactory FACES-2679
      renderResponse BridgePortletResponseFactory FACES-2679
      resourceRequest BridgePortletRequestFactory FACES-2679
      resourceResponse BridgePortletResponseFactory FACES-2679
      stateAwareResponse BridgePortletResponseFactory FACES-2679
      windowId BridgePortletRequestFactory FACES-2679
      windowState BridgePortletRequestFactory FACES-2679

      TCK: portletRequestScopedBeanInjectTest (bridge-tck-cdi-portlet)

      • @Inject each of the named beans into a Java class and verify that the injected instances are equal to those that are produced by the FacesBridge factories.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              1 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