beforeFilter

This event occurs before data loading and allows to customize filtering of dataset

class CustomBehavior extends ConnectorBehavior{
    @Override 
    public void beforeFilter(ArrayList<FilteringRule> filters) {
        //any custom code
    } 
}
component.event.attach(new CustomBehavior());

In this event handlerFunc gets the following arguments:

  • filters - set of filtering rules

Sample of usage:

class CustomBehavior extends ConnectorBehavior{
    @Override 
    public void beforeFilter(ArrayList<FilteringRule> filters) {
        Int index = filters.index("some_field");
        if (index!=-1)
             filters.get(index).operation = ">";
        } 
    }
component.event.attach(new CustomBehavior());
Back to top