FilteringTable add-on

Hi Gustavo Maia,

Thanks for the reply, but how do I make use of this function getVisibleItemIds().

In the PagedFilterTable.jar that I’m using, the search functionality is present within jar itself. So I’m unable to trigger an event from the PagedFilterTable for a search function in my java class, because of which I’m unable to retreive the list of results after search.

The requirement for me is to get only the search based filtered results from the PagedFilterTable to an excel sheet as a report.

Could you please advise.

Regards,
Rohith

Hello,

We have problem with setRefreshingEnabled method:
If setRefreshingEnabled(false) is called (which means that protected method disableContentRefreshing is called), then in CustomTable’s methods changeVariables, containerItemSetChange, setContainerDataSource, setVisibleColumns and FilterTable/FilterTreeTable’s method resetFilters unconditionally is called protected method enableContentRefreshing (exception is CustomTable’s method sort, which calls it conditionally), which means that it would be same as calling setRefreshingEnabled(true), but we need to have refreshing disabled for more than one FilterTable’s public method call:
like for example, we want to set container data source and programmatically change column’s header filtering field’s value with one actual data fetching from DB (we are using LazyQueryContainer) after all filtering values are set and other preparations are done.

P.S. We are using older “Filtering Table” version, but seems that newest “Filtering Table” version have same problem.
Now, to mitigate this problem, instead of field isContentRefreshesEnabled we are introducing counter field, which counts how many times disableContentRefreshing is called, discounts how many times enableContentRefreshing is called and, when on enableContentRefreshing call counter reaches zero, it calls methods refreshRenderedCells and markAsDirty.

Also in method sort we are changing from conditional call of enableContentRefreshing to unconditional.

Also we are changing disableContentRefreshing value returning logic to always return true so that sort method will always call enableContentRefreshing.

Is there a reason that the sources of the current version are not in the github repo? I made a patch and can’t use it with the current vaadin version…

That’s most likely because I’ve forgotten to push the sources there :frowning:

I’ll do that tomorrow. Sorry for the inconvenience.

Sorry for the delay. The github repo is now up-to-date with the latest version.

-tepi

Tepi,

Is there simple way to do the following from a single button click e.g.

  1. The user Clicks a button called “empty then reload”
  2. The FilterTable is cleared and the user actually sees an “empty” FilterTable
  3. An long action 2-3 seconds starts during this time the FilteringTable is visually empty
  4. The new data is display in the FilterTable

The code fragment below will never display the table as empty to the user depsite calling removeAllItems()

        FilterTable filterTable = new FilterTable();

        Button emptyFilterTableThenLoadNewData = new Button("empty then reload");

        emptyFilterTableThenLoadNewData.addClickListener(new Button.ClickListener() {
            @Override
            public void buttonClick(ClickEvent event) {
                // remove everything from the FilterTable, want it to refresh and display
                // an empty table.
                filterTable.removeAllItems();

                // load some new data this is long running it might take 2-3 seconds,
                // Here's the problem the FilterTable is NEVER displayed to the user as empty.
               filterTable.setContainerDataSource(buildContainer());
            }
        });
        layout.addComponent(emptyFilterTableThenLoadNewData);

I can of course break ithe above up into two seperate buttons say “clear” and “load”, and of course the table emptys and fills as expected, but I’m looking for an easy solution that mimics a user pressing “clear” followed by “load” via single button “empty then reload”

Thanks in avance

Jon Strabala

Tepi,

Answering my own question it seems I can do the following, I assume this is the “best” way and there isn’t any built in functionality that woudl do the same.

Regards,

Jon Strabala

        FilterTable filterTable = new FilterTable();

        final Button emptyFilterTableThenLoadNewData = new Button("empty then reload");
        
        // Define a thread class to do some "long" non GUI work
        class ClearLoadThread extends Thread {

            @Override
            public void run() {                
                // Update the UI thread-safely (clear our FilterTable)
                UI.getCurrent().access(new Runnable() {
                    @Override
                    public void run() {
                        filterTable.removeAllItems();
                    }
                });                
                
                // long running task (we get our data from the database here here) 
                final Container c = buildContainer();
                
                // Update the UI thread-safely (set new data in our FilterTable)
                UI.getCurrent().access(new Runnable() {
                    @Override
                    public void run() {
                        // set data container the in the FilterTable UI safe
                        filterTable.setContainerDataSource(c);
                                
                        // Stop polling
                        UI.getCurrent().setPollInterval(-1);
                        
                        emptyFilterTableThenLoadNewData.setEnabled(true);
                    }
                });
            }
        }
        
        emptyFilterTableThenLoadNewData.addClickListener(new Button.ClickListener() {

            @Override
            public void buttonClick(ClickEvent event) {
                final ClearLoadThread thread = new ClearLoadThread();
                thread.start();

                // Enable polling and set frequency to 0.25 seconds
                UI.getCurrent().setPollInterval(250);

                emptyFilterTableThenLoadNewData.setEnabled(false);
            }
        });
        buttonLayout.addComponent(emptyFilterTableThenLoadNewData);

Hi

Is it possible to make - filter for Integer column behave like String column filter ?

Like the Equals , Less than & Greater than ranges is not needed in filter.
Just simple string search, still maintaining the column as Integer type

Hello,
I implemented the add-ons filteringtable rev = "0.9.13.v7. I taked BeanItemContainer to stock my object InfoAnalyse
This add-ons is great, but I met some filter problems. The filter does not respond when:

  • The sentence is written in uppercase
  • The phrase contains a parenthesis
  • The sentence contains an “/”

Does anyone can give a hand.
My object like :
info = new InfoAnalyse();
info.setNomAnalyse(“Actinomycètes aérobies (identification)”);info.setSynonyme(“”);
collection.add(info);
info = new InfoAnalyse();
info.setNomAnalyse(“HTLV-I/II (anticorps)”);
info.setSynonyme(“”);
collection.add(info);
info = new InfoAnalyse();
nfo.setNomAnalyse(“MRSA”);
info.setSynonyme(“”);
collection.add(info);

Thank you

If my table has that much rows so that a scollbar is visible, is it possible to get the current position of the scrollbar?
Thank you!

Hi,
Can we set date manually in filter of date-column of filter table in vaadin 7? Actually It is possible in vaadin 6 , as it is shown in demo of vaadin 6 filter table.​

Actually i want date picker should be like that , as it is shown in below image. Below filter table is in vaadin 6, in this we can select the date from calender as well as we can set the date manually also. I want the same feature of date picker in vaadin 7 filtertable.
Date picker is surrounded with red color boundary in below image. i want the same feature in vaadin 7 filter table.

Can anyone please suggest me how to achieve this. i will bw very thankful.

Thank you

Does anyone know how to make filtering work for columns which reference another SQLContainer? For example, product_id would translate to basketball in the “products” table whose id is in a column of an order table?

Any help would be greatly appreciated. :slight_smile:

I use a nestedContainerProperty for the refrenced column and filtering works for me without additonal settings.

Is there a way to do this without using a BeanContainer?

Thank you for your reply. Is there a way to do this without using a BeanContainer? I’m using an SQLContainer…

Hi everybody! I hope you can help me with this issue. I have a paged filter table where last column is being shown with smaller width than the header. This happens to me always, with all paged filter tables I have in my application. Why is that?? I tried changing table width but it doesnt work. I attached an image so that you can see my problem.

I really apreciate your help!
Thank you very much,
Celeste.-
22432.png

Hi everybody…

I am having a requirement that fromdate should be less than or equal to todate.
In DateFilterPopup class fromFiled and toFiled DateField objects are there.My problem is that whenver I am selecting
fromFiled (fromdate) toFiled (todate) value must be restricted to less then or equal to toDate.

Eg : Aug-15-2015 is my from date then to date should be like Aug-15-2015,Aug-16-2015 or Sep-15-2015 but not Aug-14-2015.

How to restrict the user at UI (DateFiled component)…?
Please suggest me a way…

Hi,
I am trying Vaadin 7.6.0.beta2. When i want to compile widgetset i get this error:

Tracing compile failure path for type 'com.vaadin.client.ui.VCustomScrollTable' [INFO] [ERROR] Errors in 'jar:file:/C:/Users/UserXY/.m2/repository/org/vaadin/addons/filteringtable/0.9.13.v7/filteringtable-0.9.13.v7.jar!/com/vaadin/client/ui/VCustomScrollTable.java' [INFO] [ERROR] Line 2604: The method hasActiveRequest() is undefined for the type ApplicationConnection Has anyone similar issue?

Hello,
today I’m using the filteringTable for the first time.
I have a strange bahaviour:
I have a table with a text and a boolean column. For the boolean column the filter bar shows out of the box a combo box with “yes” and “no” and filtering works. No Problem.

For the text column in filter bar there is a text filed for filtering. The text field can get the focus, but I cannot see the entered values. The text field stays empty.
In Firefox and IE I can enter blind values and the filter is working. In chrome nothing happens when entering values in the filter text field.

I’m using vaadin 7.4.0 (with 7.5.0 the same).
filteringtable: 0.9.13.v7

Maybe someone can help me.
regards
André

I can verify that in Vaadin 7.6.0 filtering table doesn’t work, after successfull compile etc,
the client states that Widgeset does not contain implementation for org.tepi.filtertable.Filtertable etc…

Hi everyone,

I just uploaded version 0.9.14.v7 to the Directory. This should work with Vaadin 7.6.0. Please note that it most likely will not work with anything older since some API was actually removed in 7.6.0 (not just deprecated).

Please try it out and let me know if there are any issues. I tested it with the simple demo application which seemed to work fine.

-tepi