7 Replies Latest reply on May 7, 2008 6:04 AM by gressho

    Filter problem in rich:dataTable

    gressho Newbie

      Hello,

      I just added filterBy attribute to all columns in my dataTable. For a single
      column all is working fine, for rich:columns it works only in the last
      column!
      I'm using the following code:

       <rich:dataTable width="100%"
       value="#{instanceManagement.allInstances}"
       var="instance">
       <rich:column style="font-weight:bold"
       sortBy="#{instance.description}"
       filterBy="#{instance.description}"
       filterEvent="onkeyup">
       <f:facet name="header">
       <h:outputText value="#{message.instanceName}"
       id="header"/>
       </f:facet>
       <h:panelGroup style="float:right">
       <h:commandLink action="#{instanceManagement.load}">
       <f:param name="backTo"
       value="instance"/>
       <h:graphicImage value="/icons/16x16/actions/document-open.png"
       alt="#{message.headerEditInstance}"
       title="#{message.headerEditInstance}"
       style="border:0px; vertical-align:bottom;"/>
       </h:commandLink>
       <h:commandLink action="#{instanceManagement.copy}">
       <h:graphicImage value="/icons/16x16/actions/edit-copy.png"
       alt="#{message.headerCloneInstance}"
       title="#{message.headerCloneInstance}"
       style="border:0px; vertical-align:bottom;"/>
       </h:commandLink>
       <h:commandLink action="#{instanceManagement.delete}"
       onclick="return confirm('#{message.confirmDelete}')"
       style="margin-left:5px">
       <h:graphicImage value="/icons/16x16/actions/edit-delete.png"
       alt="#{message.headerDeleteInstance}"
       title="#{message.headerDeleteInstance}"
       style="border:0px; vertical-align:bottom;"/>
       </h:commandLink>
       </h:panelGroup>
       <h:outputText value="#{instance.description}"/>
       </rich:column>
       <rich:columns value="#{instanceManagement.shownColumns}"
       var="column"
       index="index"
       sortBy="#{instanceManagement.instanceProperties[instance][index].value}"
       filterBy="#{instanceManagement.instanceProperties[instance][index].value}"
       filterEvent="onkeyup">
       <f:facet name="header">
       <h:outputText value="#{column.description}"/>
       </f:facet>
       <h:outputText value="#{instanceManagement.instanceProperties[instance][index].value}"/>
       </rich:columns>
       </rich:dataTable>
      


      There is sorting enabled, too, and is working totally correct.

      Thanx

      Werner