2 Replies Latest reply on Nov 11, 2009 6:59 PM by Radu Banica

    ExtendedDataTable reRender by external filter

    Radu Banica Newbie

      Hi All,

      I want to use external filter for ExtendedDataTable since input text are not enough for me.

      I'm using <f:facet name="filter"> to define the filter inside the rich:column.
      The filter is rendered OK and table is reRendered, but the row indexes are not reset as in case of "filterBy" "filterEvent" attributes.

      I have action links on each rows, but when selecting the component that was originally on that index is called.

      THE QUESTION IS: How can I reset the row index (what method to call or attributes to set) when using external filters.

      Since row index resetting is working for "filterBy" ExtendedDataTable method, I'm sure that there is a way to expose this functionality to external filters.

      Code example:

      <rich:extendedDataTable id="customerSearchListTable"
      width="500px" height="500px"
      rendered="#{not empty customerSearchList.resultList}">
      <rich:column label="External filter" sortable="false">
      <f:facet name="filter">
      <h:inputText immediate="true" value="#{customerSearchList.customer.lastname}" id="filterLastName"
      onclick="Event.stop(event);" styleClass="rich-filter-input" >
      <a:support id="onkeyupFName" event="onchange" reRender="customerSearchListTable"
      ignoreDupResponses="true" requestDelay="700"/>
      <h:outputText value="#{_customer.id}"/>
      <rich:column sortable="true" sortBy="#{_customer.firstname}" filterBy="#{_customer.firstname}" filterEvent="onkeyup" label="First Name">
      <f:facet name="header">
      <h:outputText value="First Name" />
      <h:outputText value="#{_customer.firstname}"/>
      <rich:column sortable="true" sortBy="#{_customer.lastname}" filterBy="#{_customer.lastname}" filterEvent="onkeyup" label="Last Name">
      <f:facet name="header">
      <h:outputText value="Last Name" />
      <h:outputText value="#{_customer.lastname}"/>
      <rich:column sortable="false" styleClass="action" label="Action">
      <f:facet name="header">
      <h:outputText value="Action" />
      <a:commandLink value="Select" id="savecnt" reRender="primaryContactNameField"
      title="Select customer #{_customer.id}">
      <f:setPropertyActionListener value="#{_customer}"