2 Replies Latest reply on May 20, 2009 10:30 AM by Mikhail Vitenkov

    Problem: Filtering with rich:column in a composition doesn't

    Sebastian Fiss Newbie

      Hi everybody,
      I am using a rich:column in a facelet composition with filtering. The filter displays fine, however it always filters by the last column value.

      I am using richfaces 3.3.1.GA, myfaces 1.2.5.

      My view:

       <h:form>
       <rich:dataTable label="Table"
       value="#{test.testList}"
       rows="10"
       var="obj">
      
       <my:column title="FIRST"
       filterBy="first">
       <t:outputText value="#{obj.first}"/>
       </my:column>
      
       <my:column title="SECOND"
       filterBy="second">
       <t:outputText value="#{obj.second}"/>
       </my:column>
      
       <my:column title="THIRD"
       filterBy="third">
       <t:outputText value="#{obj.third}"/>
       </my:column>
      
       <my:column title="LAST"
       filterBy="last">
       <t:outputText value="#{obj.last}"/>
       </my:column>
      
       </rich:dataTable>
       </h:form>
      


      My facelet composition column.xhtml:
       <ui:composition>
       <rich:column filterBy="#{obj[filterBy]}"
       filterEvent="onkeyup">
       <f:facet name="header">
       <t:outputText value="#{title}" />
       </f:facet>
       <ui:insert/>
       </rich:column>
       </ui:composition>
      


      Now I have the following problem:
      No matter where (in whatever column filter) I input the desired value, it always filters by the values of the LAST column!

      Example:
       FIRST SECOND THIRD
      ________________________________________
       a b c
       a1 b1 c1
      

      If I type "a" in the filter-input of column 1 ("FIRST"), it displays zero results, same with column 2. However, if I type in "c" in any of the three filter-input-fields, it always displays the two "c"-values of column three, since it is the LAST column.

      Thanks for your help in advance!