2 Replies Latest reply on Nov 18, 2013 3:22 AM by Mohamed TALHA

    rich:dataTable very slow when filtering

    Mohamed TALHA Newbie

      Hello,

       

      I Have a rich:dataTable with 100 lines scattered on 10 pages. It works fine but when I filter by a column, it's very very slow to get the result. Can you help me please ?

       

      I'm using Richfaces3.3, JBoss 5.1 and Jboss-Seam 2.2

       

      here is my code :

       

      <rich:dataTable id="myDataTable" value="#{myBean.getValues()}" var="item" rows="10" rowKeyVar="row" onkeypress="if (event.keyCode == 13) {document.getElementById('myForm:myDataTable').blur(); return false;} else {return true;}"

                      onRowContextMenu="if (row) row.style.backgroundColor='#{aSkin.tableBackgroundColor}'; this.style.backgroundColor='#F1F1F1'; row=this; return false;"

                      onRowMouseOver="this.style.backgroundColor='#F8F8F8'"

                      onRowMouseOut="this.style.backgroundColor='#{aSkin.tableBackgroundColor}'">

                 

                      <f:facet name="header">

                          <h:outputText value="Some Values Example" />

                      </f:facet>

                 

                      <rich:column  sortBy="#{item.firstName}" filterBy="#{item.firstName}" filterEvent="onkeyup">

                          <f:facet name="header"><h:outputText value="First Name" /></f:facet>

                          <h:outputText value="#{item.firstName}" />

                      </rich:column>

       

                      <rich:column  sortBy="#{item.lastName}" filterBy="#{item.lastName}" filterEvent="onkeyup">

                          <f:facet name="header"><h:outputText value="Last Name" /></f:facet>

                          <h:outputText value="#{item.lastName}" />

                      </rich:column>


                      <f:facet name="footer">
                          <rich:datascroller renderIfSinglePage="false" for="myDataTable" />
                      </f:facet>

      </rich:dataTable>