4 Replies Latest reply on Apr 24, 2008 3:47 PM by eklam

    DataTable, FilterBy, Datascroller issue

    Gianfranco Zola Newbie


      I have a rich:dataTable with filterBy set on various columns. I have also attached a rich:dataScroller to the dataTable.
      My issue is, if I filter any column, the datascroller component is not updated, only after navigating to an other page.

      Is there any settings or workaround to get the datascroller automatically updated upon using the built in filter on the dataTable?

      Thanks in advance!

        • 1. Re: DataTable, FilterBy, Datascroller issue
          Nick Belaevski Master


          Unfortunately, we have none for now. Here is the issue for that: http://jira.jboss.com/jira/browse/RF-2815

          • 2. Re: DataTable, FilterBy, Datascroller issue
            Gianfranco Zola Newbie


            Thanks for the answer. Finally I've found a workaround. If I use custom filtering, then with this code I can rerender the scroller, wich than changes according to record count:

             <f:facet name="header">
             <h:outputText value="Category"></h:outputText>
             <h:outputText value="#{ci.category}"></h:outputText>
             <f:facet name="footer">
             reRender="selecteddevs, selecteddevs_scroller"

            One problem I still have: as you can see in the code the inputText is in the table footer. It is because if I place it in the table header, then the sortBy tag places a href also on my inputText control, and if I click in the inputText to enter some text the sorting will be executed.

            How can I solve this problem?


            • 3. Re: DataTable, FilterBy, Datascroller issue
              Ilya Shaikovsky Master

              Add to your inputText


              And you will be able use it in header without sorting effect while clicking over input.

              • 4. Re: DataTable, FilterBy, Datascroller issue
                eklam Newbie

                I tried something like this, but I couldn't make it work...

                Here is my code, where should I use the a4j:support ?

                PS: The f:param, with the id, inside commandLink is a workaround I found to the getRowData issue, I process it my bean

                 width="200" id="dataTableList" rows="8" columnClasses="col"
                 value="#{relatorioComercialMB.list}" var="item">
                 <f:facet name="header">
                 <rich:column headerClass="text-align:left; width: 30%;">
                 <h:outputText styleClass="headerText" value=""/>
                 <rich:column headerClass="text-align:left; width: 30%;">
                 <h:outputText styleClass="headerText" value="TÃtulo"/>
                 <rich:column headerClass="text-align:left; width: 30%;">
                 <h:outputText styleClass="headerText" value="Data"/>
                 <f:facet name="header">
                 <h:outputText value="Filtro"/>
                 <h:commandLink action="#{relatorioComercialMB.editar}">
                 <f:param name="idSelecionado" value="#{item.id}"/>
                 <h:graphicImage value="../../images/bt_editar.gif"/>
                 <h:commandLink action="#{relatorioComercialMB.remover}">
                 <f:param name="idSelecionado" value="#{item.id}"/>
                 <h:graphicImage value="../../images/bt_excluir.gif"/>
                 <rich:column filterBy="#{item.titulo}" filterEvent="onkeyup">
                 <h:outputText id="titulo" value="#{item.titulo}"/>
                 <rich:column filterBy="#{item.data}" filterEvent="onkeyup">
                 <h:outputText id="data" value="#{item.data}"/>
                 <rich:datascroller styleClass="listagem" id="dScroller" align="center" for="dataTableList" maxPages="10" />