0 Replies Latest reply on Mar 31, 2010 2:00 PM by Jaaouane Aymen

    Filtering request delay in rich data table in seam web project

    Jaaouane Aymen Newbie
           
      Hi all,

      I write the following view to display a rich datatable based on true pagination(fetching only the necessary rows form database when needed).

      The problem is that i want to fix a delay just for ajax filtering request.But the <a4j: queue> tag does that for all a4j requests in the facelet(sorting,filtering, row click).

      Any suggestion to fix a delay just for a4j filtering request??

      This is my xhtml view.

      Regards.

      <a4j:queue
        requestDelay="500"
        sizeExceededBehavior="fireNew" size="1" />
      <rich:dataTable value="#{accountManager.userListPanel.tableDataModel}"
        var="user" id="usersTable" rows="10" reRender="datascroller"
        styleClass="dataTableClass" rowClasses="rowColor1,rowColor2"
        disableDefault="false">
        <rich:column styleClass="#{accountManager.userListPanel.getRowColor(user)}"
         filterBy="#{user.username}" filterEvent="onkeyup"
         sortBy="#{user.username}" width="40%">
         <f:facet name="header">
          <h:outputText
           value="#{messages['fr.aptus.siaptus.user.identifier']}" />
         </f:facet>
         <h:outputText value="#{user.username}" />
        </rich:column>
        <rich:column styleClass="#{accountManager.userListPanel.getRowColor(user)}"
         filterBy="#{user.collaborator.name}" filterEvent="onkeyup"
         sortBy="#{user.collaborator.name}" width="30%">
         <f:facet name="header">
          <h:outputText value="#{messages['fr.aptus.siaptus.user.name']}" />
         </f:facet>
         <h:outputText value="#{user.collaborator.name}" />
        </rich:column>
        <rich:column styleClass="#{accountManager.userListPanel.getRowColor(user)}"
         filterBy="#{user.collaborator.surname}" filterEvent="onkeyup"
         sortBy="#{user.collaborator.surname}" width="30%">
         <f:facet name="header">
          <h:outputText value="#{messages['fr.aptus.siaptus.user.surname']}" />
         </f:facet>
         <h:outputText value="#{user.collaborator.surname}" />
        </rich:column>
        <a4j:support event="onRowClick"
         action="#{toolBarManager.showSelectedRowDetails(user)}"
         reRender="toolBarForm">
        </a4j:support>
      </rich:dataTable>
      <rich:datascroller id="datascroller" renderIfSinglePage="false"
        for="usersTable" />