0 Replies Latest reply on Nov 25, 2011 9:50 AM by Jacob Clarkson

    Custom filtering along with default sorting

    Jacob Clarkson Newbie

      Hi there,

       

      Is it possible to use custom filtering alongside default sorting when using the <rich:dataTable> component? I'm using RichFaces 3.3.2.

       

      I do not want a text input box, I would like to use a select element instead. However, when I try and do this via the header the up / down arrow injected by the sortable functionality comes after the select element.

       

      Is it at all possible to do something like the following:

       

      <rich:dataTable>
           <rich:column sortBy="#{bean.attributeX}">
                <f:facet name="header">
                     <h:outputText value="Attribute X" />
                </f:facet>
                <f:facet name="customFilter">
                     <h:selectOneMenu value="#{bean.attributeXFilterValue}">
                          <f:selectItem itemValue="0" itemLabel="Yes" />
                          <f:selectItem itemValue="1" itemLabel="No" />
                     </h:selectOneMenu>
                </f:facet>
                <h:outputText value="#{bean.attributeX}" />
           </rich:column>
      </rich:dataTable>
      

       

      Many thanks.