Filter all items and empty items

Dear all,
overriding FilterDecorator.getAllItemsVisibleString(), we can customize the “show all” filter.
Is there a way to filter items having a null value? Any FilterDecorator.getEmptyItemsVisibleString() or any workaround?

In fact, I would like to filter:

  • All items in my tables, having any value
  • All items in my tables, having null value
  • Items matching the filter

Could you suggest me how to implement this?
Regards

Hi,

there’s currently no support for “show only nulls” kind of filtering. However, you could do that yourself by implementing the FilterGenerator interface and setting your implementation to your table. Then in the getCustomFilterComponent method you could create a ComboBox, which you would fill with all the filtering options you need. If you do this, you should also make sure the generateFilter method of your implementation can return proper filters for all the options in your ComboBox.

Take a look at the source code for the add-on demo, that should get you started on this.