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

UnsupportedOperationException when trying to add JSF portlets to a portal page dynamically

    Details

      Description

      Steps to Reproduce:

      1. Modify the WEB-INF/web.xml descriptor of the jsf2-portlet so that it has javax.faces.PROJECT_STAGE=Production:

      <context-param>
      	<param-name>javax.faces.PROJECT_STAGE</param-name>
      	<param-value>Production</param-value>
      </context-param>
      

      2. Deploy the jsf2-portlet to Liferay+Tomcat

      3. Create a new portal page

      4. Navigate to the new portal page

      5. Using the Liferay "Add Application" menu, try to add the "JSF2" portlet to the page.

      If the bug is fixed, then there will be no error output in the Tomcat log. If the bug still exists, then the following error will occur:

      22:25:02,934 ERROR [http-bio-8080-exec-7][render_portlet_jsp:154] java.io.IOException: java.lang.UnsupportedOperationException
      	at com.liferay.faces.bridge.renderkit.html_basic.HeadResponseWriterLiferayImpl.endElement(HeadResponseWriterLiferayImpl.java:94)
      	at com.sun.faces.renderkit.html_basic.StylesheetRenderer.encodeEnd(StylesheetRenderer.java:112)
      	at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:881)
      	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1786)
      	at com.liferay.faces.bridge.renderkit.html_basic.HeadRendererBridgeImpl.encodeBegin(HeadRendererBridgeImpl.java:231)
      	at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:826)
      	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1777)
      	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1782)
      	at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:439)
      	at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:124)
      	at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:286)
      	at com.liferay.faces.bridge.application.ViewHandlerCompatImpl.renderView(ViewHandlerCompatImpl.java:35)
      	at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120)
      	at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
      	at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
      	at com.liferay.faces.bridge.BridgePhaseRenderImpl.execute(BridgePhaseRenderImpl.java:227)
      	at com.liferay.faces.bridge.BridgePhaseRenderImpl.execute(BridgePhaseRenderImpl.java:85)
      	at com.liferay.faces.bridge.BridgeImpl.doFacesRequest(BridgeImpl.java:112)
      	at javax.portlet.faces.GenericFacesPortlet.doView(GenericFacesPortlet.java:255)
      	at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:328)
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              neil.griffin Neil Griffin
              Reporter:
              neil.griffin Neil Griffin
              Participants of an Issue:
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Packages

                  Version Package
                  liferay-faces-3.0.3-legacy-ga4
                  liferay-faces-3.0.3-ga4
                  liferay-faces-3.1.3-ga4