2 Replies Latest reply on Mar 28, 2012 8:54 AM by fipp

    rich:dataScroller RF 4.2.0 not working

    fipp

      hy,

       

      i'am nearly stuck on working with RF 4.2.0:).

      Next problem i am facing is rich:dataScroller in a rich:dataTable.

       

      <ui:composition

              template="/META-INF/templates/headerFooterTemplate.xhtml">

       

      <ui:define name="content">

      <h:form>

                     

                          <rich:dataTable value="#{toolListBean.toolList}" var="tool"

                              id="toolsTable" rows="2" rowClasses="even-row,odd-row"

                              styleClass="stable" sortMode="multi">

       

                              <rich:column sortBy="#{tool.toolNumber}"

                                  sortOrder="#{toolsSortingBean.numberAsStringOrder}">

                                  <f:facet name="header">

                                      <a4j:commandLink value="String Number" render="toolsTable@body"

                                          action="#{toolsSortingBean.sortNumberAsString}" />

                                  </f:facet>

                                  <h:outputText value="#{tool.toolNumber}" />

                              </rich:column>

       

                              <rich:column sortBy="#{tool.toolComment}"

                                  sortOrder="#{toolsSortingBean.commentsOrder}">

                                  <f:facet name="header">

                                      <a4j:commandLink value="Kommentar" render="toolsTable@body"

                                          action="#{toolsSortingBean.sortByComments}" />

                                  </f:facet>

                                  <h:outputText value="#{tool.toolComment}" />

                              </rich:column>

       

                              <f:facet name="footer">

                                    <rich:dataScroller for="toolsTable"/>

                              </f:facet>

       

        </rich:dataTable>

      </h:form>

       

      </ui:define>

      </ui:composition>

       

      ! Therea is also a h:form Tag in the File headerFooterTemplate.xhtml.

       

      The Problem is the rich:dataScroller does not work properly.I can scroll only from page 1 to page 2 ( The Page content change correcty from page 1 to page 2) but not further .Scrolling back is not possible.I Can manually select page 3 or 4. But when i click the back arrow always page 2 is selected.

      if i add a bean in code (initialise curPage with 1 and add getter and setter) the scrolling works fine. (but not togehther with filters)

      <rich:dataScroller for="toolsTable" page="#{toolListBean.curPage}" >

       

      can anybody tell me why i've to add page="#{toolListBean.curPage}" that the rich:dataScroller works????

      thanks

      fipp

        • 1. Re: rich:dataScroller RF 4.2.0 not working
          healeyb

          Hi, does the h:form in headerFooterTemplate wrap the <ui:insert name="content" .../> ? Also, though it shouldn't matter

          can you just try <rich:dataScroller/> in the table footer without the for=. I had a problem like yours but am struggling to

          remember exactly what I did to fix it.

          • 2. Re: rich:dataScroller RF 4.2.0 not working
            fipp

            hi,

            <rich:dataScroller/> in the footer does not work. same result than with the "for" property.

            no the h:form in headerFooterTemplate does not wrap the <ui:insert name="content".

            the design is like this

             

            template.xhtml

             

            <div id="container">

                    <div id="header">

                        <ui:insert name="header">Default header</ui:insert>

                    </div>

                    <br />

                    <div id="content">

                        <ui:insert name="content">Default content</ui:insert>

                        <br />

                    </div

                    <div id="footer">

                        <ui:insert name="footer">Default footer</ui:insert>

                    </div>

                </div>

             

            headerFooterTemplate.xhtml

             

            <ui:composition template="template.xhtml">

                    <ui:define name="header" class="header">

                        <h:form>

                          <!-- some toolbar stuff-->

                      </h:form>

                    </ui:define>

            </ui:composition>

             

            tools.xhtml

             

            <ui:composition

                    template="/META-INF/templates/headerFooterAllTemplate.xhtml">

             

                    <ui:define name="content">

                      <h:form>

                           <!--

                                   the rich:datatable Code from above with

                                <rich:dataScroller for="toolsTable" page="#{toolListBean.curPage}"

                                renderIfSinglePage="false" />

                           -->

                      </h:form>

                    </ui:define>

            </ui:composition>