1 Reply Latest reply on Feb 24, 2010 6:42 AM by Eugene Bessel

    rich:column filterMethod does not work

    r s Newbie

      Hi,

       

      I am trying to filter fields in data table.

       

      here is my jsp code:

       

      <a4j:form>

      <rich:dataTable value="#{loadedJobsBean.lJobs}"

      rendered="#{loadedJobsBean.thereAreJobs}" var="job" id="table" rows="7">

      <f:facet name="header">

      <rich:columnGroup>

      <rich:column colspan="9">

      <h:outputText value="Loaded Jobs" />

      </rich:column>

      <rich:column breakBefore="true">

      <h:outputText value="#{loadedJobsBean.colID}" />

      </rich:column>

      <rich:column filterMethod="#{loadedJobsBean.filterJobName}"

      style="width:40px">

      <h:outputText value="#{loadedJobsBean.colUser}" />

      <h:inputText id="userIn" value="#{loadedJobsBean.filterValue}">

      <a4j:support event="onkeyup" reRender="table"

      ignoreDupResponses="true" requestDelay="200" focus="userIn" />

      </h:inputText>

      </rich:column>

       

       

      here is the Bean:

       

      public boolean filterJobName(Object current) {

      Job currentJob = (Job) current;

      if (filterValue.length() == 0) {

      return true;

      }

      if (currentJob.getName().toLowerCase().startsWith(filterValue.toLowerCase())) {

      return true;

      } else {

      return false;

      }

      }

       

       

      the problem is that it never entersto the  filterJobName in the bean - which is the filterMethod in the jsp.

       

      What should I do?

       

      Thanks!!