0 Replies Latest reply on Jun 30, 2011 7:31 PM by kwutzke

    rich:dataTable filtering unique rows on empty textfield?

    kwutzke

      Hello,

       

      I have a rich:dataTable whose rows come from a simple JPQL statement:

      !http://www.kawoolutions.com/media/rich-datatable-before-filtering.png!

      As you can see, it's a list of sports team, with the team type codes separated by comma being the gender and age group, e.g. FU16 means "female under 16 years". There are several teams for club "TV Dieburg" as you can see.

       

      Now when I press backspace on the search box on top, the following happens:

      !http://www.kawoolutions.com/media/rich-datatable-after-filtering.png!

      Can anyone tell me why this is happening and how to keep the list of unique rows?

       

      Here's the rich:dataTable code:

      {code}<rich:dataTable value="#{teamListQuery.resultList}"

                              var="tlvl"

                              rows="20"

                              columnClasses="left,left,left,left,left,left,center,left"

                              footerClass="center"

                              width="100%"

                              id="team-list">

        <f:facet name="header">

          <h:outputText value="Rosters for #{seasonHome.longViewRepresentation}" />

        </f:facet>

        ...

        <rich:column filterBy="#{tlvl.fullTeamDesc}" filterEvent="onkeyup">

          <f:facet name="header">

            <h:outputText value="Team"/>

          </f:facet>

          <s:link view="/roster-overview.xhtml" value="#{tlvl.fullTeamDesc}" propagation="none">

            <f:param name="roster" value="#{tlvl.rosterId}" />

          </s:link>

        </rich:column>

        <f:facet name="footer">

          <rich:datascroller id="team-list-ds"/>

        </f:facet>

      </rich:dataTable>{code}

       

      #{tlvl.fullTeamDesc} is just the string as displayed in the links, too. The default startsWith filter is not supposed to filter any rows on an empty search box.

       

      Is it about the view bean I'm using? I can't think of anything meaningful here... Any help on this is greatly appreciated!

       

      Karsten