Custom renderer which extends PrimeFaces DataTableRenderer is not invoked

2.9k views Asked by At

I'm trying to extend the PrimeFaces 1.0 (yep, sadly we are stuck at JSF 1.2) data table, because I want the built-in filter function to search in the whole field, instead of only at the beginning. So I created a class which extendes DataTableRenderer.java (Source code):

package it.myPackage;

import ...

public class CustomDataTableRenderer extends org.primefaces.component.datatable.DataTableRenderer{

    @Override
    protected void decodeAjaxFilterRequest(FacesContext facesContext, DataTable dataTable) {
        // the same method with a "contains" instead of a "startsWith"
    }
}

And I added this entry to the faces-config:

<render-kit>
    <renderer>
        <component-family>org.primefaces.component</component-family>
        <renderer-type>org.primefaces.component.DataTableRenderer</renderer-type>
        <renderer-class>it.myPackage.CustomDataTableRenderer</renderer-class>
    </renderer>
</render-kit>

But the overriden method is never called. What am I doing wrong?

Platform: Java 6, JSF 1.2, Apache 6.0.18, Mojarra 1.2_12

0

There are 0 answers