7 Replies Latest reply on May 18, 2010 5:04 AM by Peter Bachl

    rich:datatable - filtering with rich:columngroup

    odelya yomtov Novice

      Hi!

       

      I need my table to have the followings:

       

      1. sorting

      2. filtering

      3. pagers

      4. dyanmic rowclasses.

       

      I wrote the following:

      <rich:dataTable id="iii" value="#{myBean.lspots}"
      var="spot" width="300px" rows="15">

      <f:facet name="header">
      <h:outputText value="Sorting Example" />
      </f:facet>
      <rich:columnGroup rowClasses="#{spot.statusName}">
      <rich:column filterBy="#{spot.duration}" filterEvent="onKeyUp">
      <f:facet name="header">
      <h:outputText value="Duration" />
      </f:facet>
      <h:outputText value="#{spot.duration}" />
      </rich:column>
      <rich:column filterBy="#{spot.statusName}" filterEvent="onKeyUp">
      <f:facet name="header">
      <h:outputText value="statusName" />
      </f:facet>
      <h:outputText value="#{spot.statusName}" />
      </rich:column>
      </rich:columnGroup>
      <f:facet name="footer">
      <rich:datascroller id="spots_scroll1" renderIfSinglePage="false"></rich:datascroller>
      </f:facet>

       

      </rich:dataTable>

       

      now - the rowclasses works but not he filtering.

      if i remove <rich:columnGroup rowClasses="#{spot.statusName}"> - and put the rowClasses in datatable tag - the filtering work but not the colors. it seems that rowClasses works only with columngroup but filtering doesn't work with it

      how can integrate both?