Uploaded image for project: 'RichFaces'
  1. RichFaces
  2. RF-14251

Drag'n'Drop does not work with PARTIAL_STATE_SAVING off in some iteration components

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Steps to Reproduce:
      Hide

      Can be reproduced in Metamer:

      1. set partial state saving off by adding context param to the web.xml:
        <context-param>
        <param-name>javax.faces.PARTIAL_STATE_SAVING</param-name>
        <param-value>false</param-value>
        </context-param>
      2. deploy Metamer and open http://127.0.0.1:8080/metamer/faces/components/richDragSource/simple.xhtml?templates=richExtendedDataTable
      3. dragging and dropping values leads to an error on the server side with:
        2016-03-30 09:38:24,792 ERROR jsf.application (FaceletViewHandlingStrategy.java:1124)  - Error Rendering View[/components/richDragSource/simple.xhtml]
        java.lang.IllegalStateException: Component ID form:containerRichDataTable:droppedValues1 has already been found in the view.  
        	at com.sun.faces.util.Util.checkIdUniqueness(Util.java:879)
        	at com.sun.faces.util.Util.checkIdUniqueness(Util.java:863)
        	at com.sun.faces.util.Util.checkIdUniqueness(Util.java:863)
        	at com.sun.faces.util.Util.checkIdUniqueness(Util.java:863)
        	at com.sun.faces.util.Util.checkIdUniqueness(Util.java:863)
        	at com.sun.faces.util.Util.checkIdUniqueness(Util.java:863)
        	at com.sun.faces.util.Util.checkIdUniqueness(Util.java:863)
        	at com.sun.faces.util.Util.checkIdUniqueness(Util.java:863)
        	at com.sun.faces.application.view.FaceletFullStateManagementStrategy.saveView(FaceletFullStateManagementStrategy.java:697)
        	at com.sun.faces.application.StateManagerImpl.saveView(StateManagerImpl.java:89)
        	at javax.faces.application.StateManager.getViewState(StateManager.java:552)
        	at com.sun.faces.context.PartialViewContextImpl.renderState(PartialViewContextImpl.java:446)
        	at com.sun.faces.context.PartialViewContextImpl.processPartial(PartialViewContextImpl.java:305)
        	at org.richfaces.context.ExtendedPartialViewContext.processPartial(ExtendedPartialViewContext.java:264)
        	at javax.faces.component.UIViewRoot.encodeChildren(UIViewRoot.java:973)
        	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1819)
        	at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:421)
        	at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:125)
        	at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:286)
        	at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:286)
        	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 javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)
        	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295)
        	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
        	at org.richfaces.tests.metamer.TestIdentityFilter.doFilter(TestIdentityFilter.java:95)
        	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
        	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
        	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
        	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
        	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
        	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:231)
        	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149)
        	at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169)
        	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:150)
        	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97)
        	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102)
        	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344)
        	at org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:355)
        	at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:911)
        	at org.apache.tomcat.util.net.NioEndpoint$ChannelProcessor.run(NioEndpoint.java:936)
        	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        	at org.apache.tomcat.util.net.NioEndpoint$DefaultThreadFactory$1$1.run(NioEndpoint.java:1249)
        	at java.lang.Thread.run(Thread.java:745)
        09:38:24,794 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/metamer].[Faces Servlet]] (http-/127.0.0.1:8080-121) JBWEB000236: Servlet.service() for servlet Faces Servlet threw exception: java.lang.IllegalStateException: CDATA tags may not nest
        	at com.sun.faces.renderkit.html_basic.HtmlResponseWriter.startCDATA(HtmlResponseWriter.java:667) [jsf-impl-2.1.28.redhat-10.jar:2.1.28.redhat-10]
        	at javax.faces.context.ResponseWriterWrapper.startCDATA(ResponseWriterWrapper.java:172) [jboss-jsf-api_2.1_spec-2.1.28.SP1-redhat-1.jar:2.1.28.SP1-redhat-1]
        	at javax.faces.context.PartialResponseWriter.startError(PartialResponseWriter.java:342) [jboss-jsf-api_2.1_spec-2.1.28.SP1-redhat-1.jar:2.1.28.SP1-redhat-1]
        	at org.richfaces.context.PartialResponseWriterWrapper.startError(PartialResponseWriterWrapper.java:137) [richfaces-core-4.5.15-SNAPSHOT.jar:4.5.15-SNAPSHOT]
        	at com.sun.faces.context.AjaxExceptionHandlerImpl.handlePartialResponseError(AjaxExceptionHandlerImpl.java:202) [jsf-impl-2.1.28.redhat-10.jar:2.1.28.redhat-10]
        	at com.sun.faces.context.AjaxExceptionHandlerImpl.handle(AjaxExceptionHandlerImpl.java:126) [jsf-impl-2.1.28.redhat-10.jar:2.1.28.redhat-10]
        	at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:119) [jsf-impl-2.1.28.redhat-10.jar:2.1.28.redhat-10]
        	at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139) [jsf-impl-2.1.28.redhat-10.jar:2.1.28.redhat-10]
        	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594) [jboss-jsf-api_2.1_spec-2.1.28.SP1-redhat-1.jar:2.1.28.SP1-redhat-1]
        	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295) [jbossweb-7.5.12.Final-redhat-1.jar:7.5.12.Final-redhat-1]
        	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.5.12.Final-redhat-1.jar:7.5.12.Final-redhat-1]
        	at org.richfaces.tests.metamer.TestIdentityFilter.doFilter(TestIdentityFilter.java:95) [classes:]
        	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) [jbossweb-7.5.12.Final-redhat-1.jar:7.5.12.Final-redhat-1]
        	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.5.12.Final-redhat-1.jar:7.5.12.Final-redhat-1]
        	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) [jbossweb-7.5.12.Final-redhat-1.jar:7.5.12.Final-redhat-1]
        	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) [jbossweb-7.5.12.Final-redhat-1.jar:7.5.12.Final-redhat-1]
        	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.5.12.Final-redhat-1.jar:7.5.12.Final-redhat-1]
        	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:231) [jbossweb-7.5.12.Final-redhat-1.jar:7.5.12.Final-redhat-1]
        	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149) [jbossweb-7.5.12.Final-redhat-1.jar:7.5.12.Final-redhat-1]
        	at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169) [jboss-as-web-7.5.6.Final-redhat-2.jar:7.5.6.Final-redhat-2]
        	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:150) [jbossweb-7.5.12.Final-redhat-1.jar:7.5.12.Final-redhat-1]
        	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97) [jbossweb-7.5.12.Final-redhat-1.jar:7.5.12.Final-redhat-1]
        	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102) [jbossweb-7.5.12.Final-redhat-1.jar:7.5.12.Final-redhat-1]
        	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344) [jbossweb-7.5.12.Final-redhat-1.jar:7.5.12.Final-redhat-1]
        	at org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:355) [jbossweb-7.5.12.Final-redhat-1.jar:7.5.12.Final-redhat-1]
        	at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:911) [jbossweb-7.5.12.Final-redhat-1.jar:7.5.12.Final-redhat-1]
        	at org.apache.tomcat.util.net.NioEndpoint$ChannelProcessor.run(NioEndpoint.java:936) [jbossweb-7.5.12.Final-redhat-1.jar:7.5.12.Final-redhat-1]
        	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_77]
        	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_77]
        	at org.apache.tomcat.util.net.NioEndpoint$DefaultThreadFactory$1$1.run(NioEndpoint.java:1249) [jbossweb-7.5.12.Final-redhat-1.jar:7.5.12.Final-redhat-1]
        	at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_77]
        
      Show
      Can be reproduced in Metamer: set partial state saving off by adding context param to the web.xml: <context-param> <param-name>javax.faces.PARTIAL_STATE_SAVING</param-name> <param-value> false </param-value> </context-param> deploy Metamer and open http://127.0.0.1:8080/metamer/faces/components/richDragSource/simple.xhtml?templates=richExtendedDataTable dragging and dropping values leads to an error on the server side with: 2016-03-30 09:38:24,792 ERROR jsf.application (FaceletViewHandlingStrategy.java:1124) - Error Rendering View[/components/richDragSource/simple.xhtml] java.lang.IllegalStateException: Component ID form:containerRichDataTable:droppedValues1 has already been found in the view. at com.sun.faces.util.Util.checkIdUniqueness(Util.java:879) at com.sun.faces.util.Util.checkIdUniqueness(Util.java:863) at com.sun.faces.util.Util.checkIdUniqueness(Util.java:863) at com.sun.faces.util.Util.checkIdUniqueness(Util.java:863) at com.sun.faces.util.Util.checkIdUniqueness(Util.java:863) at com.sun.faces.util.Util.checkIdUniqueness(Util.java:863) at com.sun.faces.util.Util.checkIdUniqueness(Util.java:863) at com.sun.faces.util.Util.checkIdUniqueness(Util.java:863) at com.sun.faces.application.view.FaceletFullStateManagementStrategy.saveView(FaceletFullStateManagementStrategy.java:697) at com.sun.faces.application.StateManagerImpl.saveView(StateManagerImpl.java:89) at javax.faces.application.StateManager.getViewState(StateManager.java:552) at com.sun.faces.context.PartialViewContextImpl.renderState(PartialViewContextImpl.java:446) at com.sun.faces.context.PartialViewContextImpl.processPartial(PartialViewContextImpl.java:305) at org.richfaces.context.ExtendedPartialViewContext.processPartial(ExtendedPartialViewContext.java:264) at javax.faces.component.UIViewRoot.encodeChildren(UIViewRoot.java:973) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1819) at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:421) at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:125) at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:286) at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:286) 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 javax.faces.webapp.FacesServlet.service(FacesServlet.java:594) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) at org.richfaces.tests.metamer.TestIdentityFilter.doFilter(TestIdentityFilter.java:95) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:231) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149) at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:150) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344) at org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:355) at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:911) at org.apache.tomcat.util.net.NioEndpoint$ChannelProcessor.run(NioEndpoint.java:936) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.tomcat.util.net.NioEndpoint$DefaultThreadFactory$1$1.run(NioEndpoint.java:1249) at java.lang. Thread .run( Thread .java:745) 09:38:24,794 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[ default -host].[/metamer].[Faces Servlet]] (http-/127.0.0.1:8080-121) JBWEB000236: Servlet.service() for servlet Faces Servlet threw exception: java.lang.IllegalStateException: CDATA tags may not nest at com.sun.faces.renderkit.html_basic.HtmlResponseWriter.startCDATA(HtmlResponseWriter.java:667) [jsf-impl-2.1.28.redhat-10.jar:2.1.28.redhat-10] at javax.faces.context.ResponseWriterWrapper.startCDATA(ResponseWriterWrapper.java:172) [jboss-jsf-api_2.1_spec-2.1.28.SP1-redhat-1.jar:2.1.28.SP1-redhat-1] at javax.faces.context.PartialResponseWriter.startError(PartialResponseWriter.java:342) [jboss-jsf-api_2.1_spec-2.1.28.SP1-redhat-1.jar:2.1.28.SP1-redhat-1] at org.richfaces.context.PartialResponseWriterWrapper.startError(PartialResponseWriterWrapper.java:137) [richfaces-core-4.5.15-SNAPSHOT.jar:4.5.15-SNAPSHOT] at com.sun.faces.context.AjaxExceptionHandlerImpl.handlePartialResponseError(AjaxExceptionHandlerImpl.java:202) [jsf-impl-2.1.28.redhat-10.jar:2.1.28.redhat-10] at com.sun.faces.context.AjaxExceptionHandlerImpl.handle(AjaxExceptionHandlerImpl.java:126) [jsf-impl-2.1.28.redhat-10.jar:2.1.28.redhat-10] at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:119) [jsf-impl-2.1.28.redhat-10.jar:2.1.28.redhat-10] at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139) [jsf-impl-2.1.28.redhat-10.jar:2.1.28.redhat-10] at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594) [jboss-jsf-api_2.1_spec-2.1.28.SP1-redhat-1.jar:2.1.28.SP1-redhat-1] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295) [jbossweb-7.5.12.Final-redhat-1.jar:7.5.12.Final-redhat-1] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.5.12.Final-redhat-1.jar:7.5.12.Final-redhat-1] at org.richfaces.tests.metamer.TestIdentityFilter.doFilter(TestIdentityFilter.java:95) [classes:] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) [jbossweb-7.5.12.Final-redhat-1.jar:7.5.12.Final-redhat-1] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.5.12.Final-redhat-1.jar:7.5.12.Final-redhat-1] at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) [jbossweb-7.5.12.Final-redhat-1.jar:7.5.12.Final-redhat-1] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) [jbossweb-7.5.12.Final-redhat-1.jar:7.5.12.Final-redhat-1] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.5.12.Final-redhat-1.jar:7.5.12.Final-redhat-1] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:231) [jbossweb-7.5.12.Final-redhat-1.jar:7.5.12.Final-redhat-1] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149) [jbossweb-7.5.12.Final-redhat-1.jar:7.5.12.Final-redhat-1] at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169) [jboss-as-web-7.5.6.Final-redhat-2.jar:7.5.6.Final-redhat-2] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:150) [jbossweb-7.5.12.Final-redhat-1.jar:7.5.12.Final-redhat-1] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97) [jbossweb-7.5.12.Final-redhat-1.jar:7.5.12.Final-redhat-1] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102) [jbossweb-7.5.12.Final-redhat-1.jar:7.5.12.Final-redhat-1] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344) [jbossweb-7.5.12.Final-redhat-1.jar:7.5.12.Final-redhat-1] at org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:355) [jbossweb-7.5.12.Final-redhat-1.jar:7.5.12.Final-redhat-1] at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:911) [jbossweb-7.5.12.Final-redhat-1.jar:7.5.12.Final-redhat-1] at org.apache.tomcat.util.net.NioEndpoint$ChannelProcessor.run(NioEndpoint.java:936) [jbossweb-7.5.12.Final-redhat-1.jar:7.5.12.Final-redhat-1] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_77] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_77] at org.apache.tomcat.util.net.NioEndpoint$DefaultThreadFactory$1$1.run(NioEndpoint.java:1249) [jbossweb-7.5.12.Final-redhat-1.jar:7.5.12.Final-redhat-1] at java.lang. Thread .run( Thread .java:745) [rt.jar:1.8.0_77]

      Description

      In EAP 6.4.x (last tried 6.4.6) and below (tried with 6.3.4, 6.2.4) the DnD does not work when partial state saving is off and performing a drop in some of the iteration components.

      Affected iteration components/templates:

      • accordion
      • dataTable
      • extendedDataTable
      • dataGrid
      • list

      Works in JSF data table, richCollapsibleSubTable, a4jRepeat, UIRepeat.

      Looks like an upstream (Mojarra) issue, because it works in WildFly 8.2 and up.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  jstefek Jiří Štefek
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated: