FilteringTable add-on

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

Hi,

Could you please update your github repo with these changes as well. We maintain a fork and it is broken against Vaadin 7.6.0.

Thanks,
Misha

Hi,

sorry about that. The changes are in github now too.

-tepi

Hi, Thanks for the update, it seems to be working fine now in 7.6.0! :slight_smile:
I’ll let you know if anything comes up!

Hi,

Is there any way to enter date manually for date property in filtertable (vaadin7) . Our requirment is that user should be able to select the date from pop-up datefield and direct value also he should be able to enter.

-Rajashekhar Muntha
22602.png

Hi,

Has anyone used FilterTable in a popup?
I am facing lot of issues related to sizing when using it inside a popup.

My requirement is that i want to window to size according to the table width and height and i also want to define a max width and height. I dont want to control the size of each popup separately because my screens and popup are created based on configuration.
Here is my component Heiearchy:

  • Window -
    sizeUndefined

    [list]
  • VerticalLayout (for contents) - here additional components like save or close button are getting added apart from grid -
    SizeUndefined

    [list]
  • Vertical Layout(for grid and toolbar) - toolbar is conditional -
    Grid-Width - 100% and Height - Undefined, Toolbar - setsizeFull


    [/list]

    [/list]

My Grid can have all type of other components like TextBox, Label, Panel and it should fit or show scrollbar if exceeds the max height and width.

One of the issues i found if i dont set the max height or width is that the header and footer for filterwrap are set as 90000 px which is causing lot of problems, not sure why do we need such big width?
Can anyone help me with this?

Hi all,

when doing a filter search and getting no results, I get instead of an empty table following stracktrace returned.
It seems that my filteringtable and the underlying container (LQC) is playing ping pong :frowning:

@Teppo or anybody here: Any idea how to fix this? Any advice is welcome :slight_smile:

Jan 25, 2016 8:41:03 PM com.vaadin.server.DefaultErrorHandler doDefault
SCHWERWIEGEND: 
java.lang.IndexOutOfBoundsException
    at org.vaadin.addons.lazyquerycontainer.LazyIdList.get(LazyIdList.java:89)
    at org.vaadin.addons.lazyquerycontainer.LazyQueryContainer.firstItemId(LazyQueryContainer.java:276)
    at com.vaadin.ui.CustomTable.firstItemId(CustomTable.java:4618)
    at com.vaadin.ui.Table.firstItemId(Table.java:4684)
    at com.vaadin.ui.Table.setCurrentPageFirstItemIndex(Table.java:1569)
    at com.vaadin.ui.Table.containerItemSetChange(Table.java:4586)
    at com.vaadin.ui.AbstractSelect.fireItemSetChange(AbstractSelect.java:1730)
    at com.vaadin.ui.AbstractSelect.containerItemSetChange(AbstractSelect.java:1701)
    at com.vaadin.ui.CustomTable.containerItemSetChange(CustomTable.java:4512)
    at org.vaadin.addons.lazyquerycontainer.LazyQueryContainer.notifyItemSetChanged(LazyQueryContainer.java:443)
    at org.vaadin.addons.lazyquerycontainer.LazyQueryContainer.addContainerFilter(LazyQueryContainer.java:495)
    at org.tepi.filtertable.FilterFieldGenerator.setFilter(FilterFieldGenerator.java:369)
    at org.tepi.filtertable.FilterFieldGenerator.updateFilterForField(FilterFieldGenerator.java:572)
    at org.tepi.filtertable.FilterFieldGenerator.access$100(FilterFieldGenerator.java:44)
    at org.tepi.filtertable.FilterFieldGenerator$2.valueChange(FilterFieldGenerator.java:535)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:508)
    at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:198)
    at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:161)
    at com.vaadin.server.AbstractClientConnector.fireEvent(AbstractClientConnector.java:1003)
    at com.vaadin.ui.AbstractField.fireValueChange(AbstractField.java:1159)
    at com.vaadin.ui.AbstractField.setValue(AbstractField.java:570)
    at com.vaadin.ui.AbstractField.setValue(AbstractField.java:468)
    at com.vaadin.ui.AbstractTextField.changeVariables(AbstractTextField.java:204)
    at com.vaadin.server.communication.ServerRpcHandler.changeVariables(ServerRpcHandler.java:603)
    at com.vaadin.server.communication.ServerRpcHandler.handleInvocations(ServerRpcHandler.java:422)
    at com.vaadin.server.communication.ServerRpcHandler.handleRpc(ServerRpcHandler.java:273)
    at com.vaadin.server.communication.UidlRequestHandler.synchronizedHandleRequest(UidlRequestHandler.java:79)
    at com.vaadin.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:41)
    at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1409)
    at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:364)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
    at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:521)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1096)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:674)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:745)