2 Replies Latest reply on Feb 11, 2011 2:56 AM by Peter Schütt

    rich:dataTable and rich:dataScroller

    Peter Schütt Newbie

      Hallo,

      I have a rich:dataTable in the following structure:

        <h:form class="top">

             <div id="content">

                  <h:panelGrid columns="2" columnClasses="top, top">

                      <rich:tabPanel id="mainTabPanel" switchType="client" activeItem="#{mainController.activeTab}" immediate="true" render="mainTabPanel" >

                           <rich:tab header="#{ur.reports_reports}" name="reports"  disabled="#{!userDetails.admin}">

                                      <a4j:region>

                                          <rich:tabPanel switchType="ajax">

                                              <rich:tab header="#{ur.reports_processes_reports}">

                                                  <a4j:outputPanel id="processes_reports">

                                                      <ui:include src="/web/process/processesreport.xhtml"/>

                                                  </a4j:outputPanel>

      The included file:

      <f:view xmlns="http://www.w3.org/1999/xhtml"

              xmlns:h="http://java.sun.com/jsf/html"

              xmlns:f="http://java.sun.com/jsf/core"

              xmlns:ui="http://java.sun.com/jsf/facelets"

              xmlns:a4j="http://richfaces.org/a4j"

              xmlns:rich="http://richfaces.org/rich">

          <div id="content">

              <h:panelGrid columns="2" columnClasses="top, top">

                  <h:panelGrid columns="1" columnClasses="top">

                      <rich:dataTable columns="20" value="#{taskReportsBean.taskInfos}" rows="#{taskReportsBean.showSize}"

                                      var="taskInfo" rowKeyVar="row" id="taskInfos" render="taskInfos_ds">

      ....

                         <f:facet name="footer">

                              <rich:dataScroller for="taskInfos" id="taskInfos_ds" rendered="#{taskReportsBean.taskInfosSize > 2}">

                              </rich:dataScroller>

                          </f:facet>

                      </rich:dataTable>

       

      The table and the dataScroller are builded correctly.

      But when I push a button of the dataScroller then I get this exception:

       

      java.lang.IllegalStateException: CDATA tags may not nest

              at com.sun.faces.renderkit.html_basic.HtmlResponseWriter.startCDATA(HtmlResponseWriter.java:626)

              at javax.faces.context.ResponseWriterWrapper.startCDATA(ResponseWriterWrapper.java:168)

              at javax.faces.context.PartialResponseWriter.startUpdate(PartialResponseWriter.java:201)

              at org.richfaces.context.PartialViewContextImpl$RenderVisitCallback.visit(PartialViewContextImpl.java:515)

              at org.richfaces.context.RenderExtendedVisitContext.invokeVisitCallbackForImplicitComponent(RenderExtendedVisitContext.java:71)

              at org.richfaces.context.BaseExtendedVisitContext.invokeVisitCallback(BaseExtendedVisitContext.java:492)

              at javax.faces.component.UIComponent.visitTree(UIComponent.java:1476)

              at javax.faces.component.UIComponent.visitTree(UIComponent.java:1487)

              at javax.faces.component.UIComponent.visitTree(UIComponent.java:1487)

              at javax.faces.component.UIComponent.visitTree(UIComponent.java:1487)

              at javax.faces.component.UIComponent.visitTree(UIComponent.java:1487)

              at javax.faces.component.UIComponent.visitTree(UIComponent.java:1487)

              at javax.faces.component.UIComponent.visitTree(UIComponent.java:1487)

              at javax.faces.component.UIComponent.visitTree(UIComponent.java:1487)

              at javax.faces.component.UIComponent.visitTree(UIComponent.java:1487)

              at javax.faces.component.UIComponent.visitTree(UIComponent.java:1487)

              at javax.faces.component.UIForm.visitTree(UIForm.java:331)

              at javax.faces.component.UIComponent.visitTree(UIComponent.java:1487)

              at javax.faces.component.UIComponent.visitTree(UIComponent.java:1487)

              at org.richfaces.context.PartialViewContextImpl.processPartialRenderPhase(PartialViewContextImpl.java:280)

              at org.richfaces.context.PartialViewContextImpl.processPartial(PartialViewContextImpl.java:210)

              at javax.faces.component.UIViewRoot.encodeChildren(UIViewRoot.java:968)

              at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1643)

              at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:378)

              at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:127)

              at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:269)

              at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:117)

              at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:97)

              at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:135)

      ....

       

       

      Thanks for any hints.

       

      Ciao

        Peter Schütt

        • 1. rich:dataTable and rich:dataScroller
          Balder Carrate Newbie

          Hi, i'm not sure if this will help, but in my included files like your "processesreport.xhtml" i use <ui:composition> instead of <f:view>.

           

          I think you should rerender datatable from datascroller and viceversa.

           

          Hope it can be useful.

          • 2. rich:dataTable and rich:dataScroller
            Peter Schütt Newbie

            Hallo,

            changing from f:view to ui:composition does not change anything.

             

            But an explicite render of the table works.

             

                               <f:facet name="footer">

                                   <rich:dataScroller for="taskInfos" id="taskInfos_ds"rendered="#{taskReportsBean.taskInfosSize > 2}" render="taskInfos">

                                    </rich:dataScroller>

                                </f:facet>

             

            Thank You.

             

            Ciao

              Peter Schütt