javascriptjsf-2richfacesfilteringrichdatatable

How to remove filter components row from an extendedDataTable in richfaces


I have an extendedDataTable with a column like this

<rich:column id="exampleId"
             filter="#{exampleFilterBean.exampleFilterMethod}"
             filterValue="#{exampleFilterBean.exampleFilterValue">
             <f:facet name="header" >
                  <h:outputText value="Header" />
             </f:facet>
             <h:outputText value="#{exampleFilterBean.example.exampleAttribute}" />

I don't want to display the control bar with the filter box because I'm using external filters and JavaScript API.


Solution

  • You can easily hide them by adding a css-command:

    .rf-edt-flt-c { display:none; }
    

    Also the input boxes will be removed when you remove the filter/filterattribute - attributes

    A third way is to remove them via javascript using extended data tables onready-attribute

    onready="$('.rf-edt-flt-c', this).each(
                    function(n){ 
                        this.parentNode.removeChild(this);
                     });"
    

    Hope it helps...