1 Reply Latest reply on Aug 18, 2010 5:13 AM by Ilya Shaikovsky

    pagination problem

    Abdo Zyan Newbie

      Hi all,

       

      i have nested datatable, and i need to paginate the two tables, i tried to use rich:datascroller and it works fine for main table but for the nested table i got error like this

       

      WARN [http-8080-2] UIDatascroller.setupFirstRowValue(471) | Datascroller tabsNav:mainResTable:nestedResTable:j_id_jsp_1868319451_76: The requested page #2 isn't found in the model containing 1 pages. Paging is reset to page #1

       

      i tried something like this:

       

       

                <rich:dataTable id="mainResTable"
                                                  value="#{researchesBean.categoryResearches}" var="cat2"
                                                  styleClass="researchesTable" rows="1">
                                                  <rich:columnGroup>

       

                                                      <rich:column>
                                                          <rich:dataTable id="nestedResTable"
                                                              value="#{cat2.researches}" var="res"
                                                              binding="#{researchesBean.dataTable}"
                                                              styleClass="innerresearchesTable"
                                                              columnClasses="sectorsColumns,sectorsColumns,sectorsColumns,sectorsColumnsRight" rows="2">
                                                              <f:facet name="header">
                                                                  <h:outputText value="#{cat2.category}" />
                                                              </f:facet>

       


                                                              <rich:column headerClass="sectorsHeader">
                                                                  <f:facet name="header">
                                                                      <h:outputText value="ResearchName" />
                                                                  </f:facet>
                                                                  <h:graphicImage url="#{researchesBean.researchIcon}" /> 
                                                                  <h:outputLink value="#{request.contextPath}/file">
                                                                      <f:param name="file"
                                                                          value="#{res.fileName}.#{res.fileExtension}" />
                                                                      <h:outputText value="#{res.researchName}" />
                                                                  </h:outputLink>
                                                              </rich:column>
                                                              <rich:column headerClass="sectorsHeader">
                                                                  <f:facet name="header">
                                                                      <h:outputText value="Product" />
                                                                  </f:facet>
                                                                  <h:outputText value="#{res.productId}" />
                                                              </rich:column>
                                                              <rich:column headerClass="sectorsHeader">
                                                                  <f:facet name="header">
                                                                      <h:outputText value="Category" />
                                                                  </f:facet>
                                                                  <h:outputText value="#{res.researchCategory}" />
                                                              </rich:column>
                                                              <rich:column headerClass="sectorsHeaderRightWide">
                                                                  <f:facet name="header">
                                                                      <h:outputText value="Date" />
                                                                  </f:facet>
                                                                  <h:outputText value="#{res.datetimeReceived}">
                                                                      <f:convertDateTime pattern="MMM dd,yyyy" />
                                                                  </h:outputText>
                                                              </rich:column>
                                                              <f:facet name="footer">
                                                                  <rich:datascroller  maxPages="10"/>
                                                              </f:facet>
                                                          </rich:dataTable>
                                                      </rich:column>
                                                      <f:facet name="footer">
                                                          <rich:datascroller  maxPages="10"/>
                                                      </f:facet>
                                                  </rich:columnGroup>
                       </rich:dataTable>