FilteringTable add-on

Hi,

As I mentioned before there is an issue with the search boxes being disabled. I thought its caused by having my table in a split panel but I was wrong. Apparently the issue is with having the table in a tabsheet, and only with the tab that is being select on starting up the application. So the scenario is I have a table on tab1 which is the default tab to open when the application is started, and search boxes are disabled there. Then I have a filter table on tab2, which if I open up has all search boxes enabled. If I try returning to tab1 search boxes are still disabled.

Any suggestions?? Thanks!

Hi Rajesh,

Thank you for trying out FilterTable. It is still work in progress so please pe patient :). I’ll try to fix the issues raised here as soon as I have the time.

Just to make sure I understood correctly: You would like to define e.g. a ComboBox with a set of different filtering options, and selecting one of these options would return a custom Filter that would be applied to the column? I think this would be quite simple to implement.

I think this is due to the different theming you are using. I have actually only tested the FIlteringTable with the Reindeer theme of Vaadin. I’ll look into it and see if it could be fixed.

-Tepi

Hi Todor,

Thanks for your bug report. Unfortunately I don’t have any immediate suggestions on what could be wrong and how to fix it. I’ll try it out myself and see what’s wrong.

-Tepi

Great addon! Is there anyway to have this working along with the Export table addon?

Hi,

How can we move forward with the tree table thing. Can you provide some guidance?

Thanks,
S.

Hi there,

Just as info… I realized that the width of the filter boxes are okay when I use the chameleon theme… Maybe that helps. Anyway: great add on. Saved my life.

Regards

Schlomo

Hi,

Is there a way I can reset all values in the filters to null, say by clicking on a refresh button, so that I can get the full result of my data container? Because for example if you have 40+ fields is quite inconvenient to scroll to say column 31 to delete the value so you can get full set as well.

Thanks in advance!

I have taken a stab at refactoring FilterGenerator so that it generates both the Field used for capturing the desired value(s) and the Filter that does the corresponding processing.
This allows, for instance, creating a filter based on the actual contents of a table column (select distinct values, create a select from that, and use it as the filtering field, much like excel does).

I’m hoping to post an update of my variant sometime next week. Tepi, how far along are you in setting up a source repository for your code? I’d rather not create a fork.

Can’t we just push that somewhere on github and be done with it? I’d also like to give a shot a tree table support and doing that out the blue is something I’d like to avoid.

Hi,

there’s a Git repo now available
here
. Patches are very welcome, especially regarding the TreeTable support :).

-Tepi

Ah nice! That would be my first client-side change to Vaadin. I guess most of the code would be shared.

I’ll have a look.

Thanks,
S.

Hi again,

[quote=Teppo Kurki]

I now had the time to try out the bug you described but I could not reproduce it. I added two tabs to a tabsheet that is visible in the application main window. Both tabs contain a filter table. Regardless of which tab is selected at application start, the tables in both tabs function normally. I tested with Vaadin 6.7.5. If you’re still having the issue, please provide a simple test case on how to reproduce the bug. Thanks.

-Tepi

Ok, I didn’t have my tabsheet set to setEnabled(true). When I added this it fixed the problem.

Btw I mentioned before if there is a way to clear the filter boxes you can see my reasons above. Any suggestions here?

Thanks!

Hi Tepi,

Do you intend to put your changes to Table (in CustomTable) back to Vaadin itself? Because TreeTable extends from Table and I would have to basically copy/paste the TreeTable class as well. Which is probably a very bad idea when Vaadin will add improvements in Tree/TreeTable (or fix bug!)

What is the strategy to ensure this add-on can follow upcoming changes in Vaadin. Wouldn’t that be a candidate for the core framework actually?

Thanks,
S.

Hi,

Seems you’ve reached the root of the problem, which boils down to the Table/TreeTable being basically unextendable. Unfortunately I do not have the authority to just add this to core Vaadin, but if you want to help please create an enhancement ticket in our trac. I thought one existed already but I could not find it. I’d say Vaadin 7 should at least at some point help with this issue but of course there’s still some time until that’ll happen.

For ‘full’ support I should of course provide different versions of FilteringTable for different Vaadin versions (starting from 6.7.5) and port back bug fixes or added features. In practice I will probably not have time to do the feature back porting for the previous versions so I’ll most likely only add new features to the most recent version (I’ll try to get a version fro 6.7.6 out this week). Again, please do create an enhancement ticket to the Vaadin trac if you feel this is something that should be included in the core.

-Tepi

I definitely think it would be very valuable to add this to the core. I created #8548

It’s a very nice add-on.

I tried using it with a BeanItemContainer but I ran into a NullPointerException when calling FilterTable.setContainerDataSource() method:

java.lang.NullPointerException
org.tepi.filtertable.FilterTable.createField(FilterTable.java:291)
org.tepi.filtertable.FilterTable.initializeFilterFields(FilterTable.java:270)
org.tepi.filtertable.FilterTable.setContainerDataSource(FilterTable.java:130)

The container is empty at this point. Any ideas?

Thanks,
Mika

I just released version 0.5.1 of the FilteringTable add-on. The changes are listed below:

• Fixed filter field width issue - should now work with virtually all themes
• Added support for text change events per property ID (thanks to Jean-François Lamy)
• Added method to adjust text change event timeout per property ID
• Removed the need to set the FilterDecorator before the container
• Added a getter for filter bar visibility state
• Added a resetFilters method
• Now preserves filter bar visibility state over container/decorator change and filter reset

These are all issues brought up in this thread, so I’d like to thank you for all the bug reports and enhancement requests. The 0.5.1 version is still based on the Table in Vaadin 6.7.5.

Please try out the new version and keep the bug reports and feature requests coming in!

-Tepi

The one important feature still missing (which I had started and almost done) is the ability to set the FilterField as a custom select (or any other itemization field). One obvious use is to get all the distinct values in a column, and allow the user to filter on them (just like Excel or LibreOffice Calc do). I got sucked into a real job black hole, and won’t emerge until April I’m afraid. So unless I get a lucky break I won’t be contributing anything for a while.

Version 0.5.2 of FilteringTable released. The only change is that this version is based on the Table from Vaadin 6.7.6. Some quite annoying bugs were fixed in that version so it’s probably for the best to move to this version.

Demo application is updated too. New features in the demo are the reset button and a text change listener for the ‘name’ column filter.

-Tepi