DateFilterPopup in Filtering Table

Hi,

I am using filteringtable addon . I have overridden getCustomFilterComponent(Object propertyId) method in FilterGenerator class to provide my implementation of DateFilterPopup like below

if (“Start Date”.equals(propertyId)) {
CustomField customDateFilterPopup = new MyDateFilterPopup(decorator, propertyId);
return customDateFilterPopup;
}
DateFilterPopup is the default class used for date filtering where user can select from and to date (date range). In MyDateFilterPopup I am overriding the existing behaviour so that I can filter dates based on exact date and not ‘from’ and 'to dates.
But once the date is selected , the filter doesn’t work. It just shows empty table eventhough there are valid values available.

P.S: If i replace MyDateFilterPopup with DateFilterPopup, it works fine.

Thanks
Barath

Hello Guys,

Anyone has any idea on this issue?

Thanks
Barath

Barath, I’m having the exact same problem. Did you find a solution?

I copied the exact contents of DateFilterPopup.java into my own class and overwrote getCustomFilterComponent(Object propertyId).

No luck so far.

I’m making some progress, but still working through issues. Right now I’ve updated MyDateFilterPopup so that it extends DateFilterPopup because I believe there’s some base code that works better with it. Basically I extended the class with almost identical source (had to update setFilterDecorator to avoid null pointers). Now I’m updating buildPopup to what I need.

In my case I want to enhance the DateFilterPopup (buttons, input validation, etc…).

In your case, you could try extending DateFilterPopup, then change buildPopup() so it does what you want it to do (one date selector, and you could just change the to and from dates so they’re always equal).

It’s not the cleanest solution, but I think it’ll work

Thanks Eric, Its a while i tried working on the customization of date filter. Let me try extending DateFilterPopup. I used to extrend “CustomField” since this is the base class of DateFilterPopup. But it didnt work

Thanks
Barath