2 Replies Latest reply on Mar 27, 2013 4:59 AM by Thomas Falkenberg

    datatable not shows input filter box

    Keith Wong Newbie

      Try to use default filter on datatable in RF4.2.2-final jars. No input filter box showed.

      Thanks in advance.


      snipplet of xhtml:


                          <rich:dataTable value="#{userBeanView.users}" var="cap" width="200px" id="ttt">

                                  <f:facet name="header">

                                      <h:outputText value="Sorting Example"/>


                                  <rich:column filterBy="#{cap.userName}" filterEvent="onkeyup">

                                          <f:facet name="header">

                                              <h:outputText value="User Name"/>


                                         <h:outputText value="#{cap.userName}"/>



                                  <rich:column filterBy="#{cap.emailAddr}" filterEvent="onkeyup">

                                      <f:facet name="header">

                                          <h:outputText value="Email Address"/>


                                      <h:outputText value="#{cap.emailAddr}"/>





      snipplet of viewscope backed bean:

      public List<User> getUsers() {

        //users = accountService.getAllUsers();

        users = new ArrayList();

        for (int i =1;i < 11; i++){

         User user = new User();






        logger.info("Got size of user:"+users.size());

        return users;




        • 1. Re: datatable not shows input filter box
          kevin 2 Newbie

          You should add <h:inputText/> in the header facet of your columns as it is done in the showcase example :



          <rich:column filterValue="#{carsFilteringBean.vinFilter}"
              <f:facet name="header">
                      <h:outputText value="VIN " />
                      <h:inputText value="#{carsFilteringBean.vinFilter}">
                          <a4j:ajax event="blur" render="table" execute="@this" />
              <h:outputText value="#{car.vin}" />
          • 2. Re: datatable not shows input filter box
            Thomas Falkenberg Newbie


            i've got the same Problem when trying to use build-in search.


            @kevin this solution works fine but it doesn't use the filterBy and filterEvent attributes, which would make the code more readable.


            Is it possible to use these attributes?