3 Replies Latest reply on Mar 29, 2011 3:12 AM by ilya_shaikovsky

    filtering on datatable doesn't work

    cremersstijn

      I cannot get the filtering on a datatable working for some reason...

      The filter input field isn't visible. I only see the data and header.

       

      This is my .xhtml file:

       

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
          xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:a4j="http://richfaces.org/a4j" xmlns:rich="http://richfaces.org/rich">
      
      
      <body>
      <ui:composition template="/templates/template.xhtml">
      
      
          <ui:define name="title">RichFaces GAE Sample</ui:define>
      
      
          <ui:define name="body">
              <h:form>
      
      
                    <rich:dataTable
                          value="#{richBean.list}"
                          var="w">
      
                          <f:facet name="header">
      
      
                                <rich:column>
                                     <h:outputText value="name">
                                </rich:column>
      
      
                             </f:facet>
      
      
                          <rich:column filterEvent="keyup" filterBy="#{w.value}" filterValue="#{richBean.filterValue}">
                                    #{w.value}
                          </rich:column>
      
                </rich:dataTable>
      
      
              </h:form>
          </ui:define>
      </ui:composition>
      </body>
      </html>
      
      

       

      This is the backing bean:

       

      package be.cremers.richfaces.gae.menu;
      
      
      import java.io.Serializable;
      import java.util.*;
      
      
      public class RichBean implements Serializable {
      
      
          private static final long serialVersionUID = -2403138958014741653L;
      
      
          private List<Name> list;
          private String filterValue = "";
      
          public RichBean() {
              System.out.println("post construct: initialize");
                list = new ArrayList<Name>();
                list.add(new Name("stijn"));
                list.add(new Name("papa"));
                list.add(new Name("frea"));
          }
      
      
           public List<Name> getList() {
              return list;
          }
      
      
          public void setList(List<Name> list) {
              this.list = list;
          }
      
          public String getFilterValue(){
                    return filterValue;
          }
      
          public void setFilterValue(String filterValue){
                    this.filterValue = filterValue;
          }
      }
      
      
      

       

      This is my environment:

      google app engine

      richfaces 4.0.0.20110227-CR1

      mojarra 2.0.3-b03

      I use the wine skin.

       

       

      Anyone some suggestions?

      Thanks!