Thanks for the bug report. I’ll check out the best way to fix this and will add it to the next release.
Hi,
As I see “Clear” button is not working on date filter in provided demo: http://tepi.virtuallypreinstalled.com/filteringtable-v7/. I’m facing the same issue in my application. Any ideas how this can be fixed?
Steps to reproduce:
- Open page: http://tepi.virtuallypreinstalled.com/filteringtable-v7/
- Go to “Normal FilterTable” tab
- Set “Start date” and “End date” in the “Date” column filter and click “Set”
- Clear the filter by clicking “Clear” button → Operation fails with the exception.
Exception stack trace:
Caused by: java.lang.NullPointerException
at com.vaadin.data.util.filter.Between.equals(Between.java:71)
at org.tepi.filtertable.FilterFieldGenerator$2.valueChange(FilterFieldGenerator.java:471)
…
Thanks in advance.
Fixed this by modifying class: FilterFieldGenerator.java:471
Changed from:
if (possiblyExistingFilter != null
&& possiblyExistingFilter.equals(newFilter)) {
return;
}
To:
if (possiblyExistingFilter != null && newFilter != null && possiblyExistingFilter.equals(newFilter)) {
return;
}
It would be great to have this fix in the upcoming version.
Hi!
I have an other problem. When my class extends FilterTable all is ok but when I extend FilterTreeTable, the filterbar doesn’t appear. When I see the source code of my page, the filters-wrap doesn’t exist.
I use vaadin 6.8.13 and FilteringTable 0.9.1.
Thanks for your help.
Julie
Hi!
The problem was the version 6.8.13 of vaadin.
I use 6.8.12 and it works fine.
Julie
Hi,
How can I change a background color of specific row in this FilterTable?
Do I need put something in styles.scss?
Can someone post a example file with styles.scss
Thank you for help.
Bjorn
First of all, thanks for the great addon!
As a suggestion, I would like to use RowHeaderMode.INDEX so that indexes are counted from the first item on the table, not just starting from the first visible item. (ie. currently on page 3/5 indexes are 1-25, instead of 76-100)
I tried to override this behaviour, homever the CustomTable.parseItemIdToCells is a private function and not really overridable.
As that function is also huge, overriding it will probably lead to compatibility problems down the road.
Maybe a new RowHeaderMode type could be implemented or the parseItemIdToCells function made protected?
Greetings,
I suppose this question is a long shot, but my production system failed several times this morning and all I have to go on is this stack trace. I looked at the source code in FilterTable and CustomTable, but don’t see how it got to a failure point. Any ideas? (Beyond the obvious, “the variable was null!”.)
09:18:43.242 ERROR http-nio-80-exec-13: Uncaught UI exception [...ErrorHandler]
java.lang.NullPointerException: null
at com.vaadin.ui.CustomTable.findNumRowsToPaint(CustomTable.java:3702) ~[filteringtable-0.9.3.v7.jar:7.1.9]
at com.vaadin.ui.CustomTable.doPaintContent(CustomTable.java:3210) ~[filteringtable-0.9.3.v7.jar:7.1.9]
at com.vaadin.ui.CustomTable.paintContent(CustomTable.java:3196) ~[filteringtable-0.9.3.v7.jar:7.1.9]
at org.tepi.filtertable.FilterTable.paintContent(FilterTable.java:69) ~[filteringtable-0.9.3.v7.jar:0.9.3.v7]
at com.vaadin.server.LegacyPaint.paint(LegacyPaint.java:65) ~[vaadin-server-7.1.9.jar:7.1.9]
at com.vaadin.server.communication.LegacyUidlWriter.write(LegacyUidlWriter.java:81) ~[vaadin-server-7.1.9.jar:7.1.9]
at com.vaadin.server.communication.UidlWriter.write(UidlWriter.java:106) ~[vaadin-server-7.1.9.jar:7.1.9]
at com.vaadin.server.communication.UIInitHandler.getInitialUidl(UIInitHandler.java:282) ~[vaadin-server-7.1.9.jar:7.1.9]
at com.vaadin.server.communication.UIInitHandler.synchronizedHandleRequest(UIInitHandler.java:79) ~[vaadin-server-7.1.9.jar:7.1.9]
at com.vaadin.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:37) ~[vaadin-server-7.1.9.jar:7.1.9]
at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1382) ~[vaadin-server-7.1.9.jar:7.1.9]
at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:238) ~[vaadin-server-7.1.9.jar:7.1.9]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728) ~[servlet-api.jar:na]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) ~[catalina.jar:7.0.47]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) ~[catalina.jar:7.0.47]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222) ~[catalina.jar:7.0.47]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) ~[catalina.jar:7.0.47]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) ~[catalina.jar:7.0.47]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) ~[catalina.jar:7.0.47]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100) ~[catalina.jar:7.0.47]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) ~[catalina.jar:7.0.47]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) ~[catalina.jar:7.0.47]
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041) ~[tomcat-coyote.jar:7.0.47]
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603) ~[tomcat-coyote.jar:7.0.47]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1721) ~[tomcat-coyote.jar:7.0.47]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1679) ~[tomcat-coyote.jar:7.0.47]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) ~[na:1.7.0_25]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) ~[na:1.7.0_25]
at java.lang.Thread.run(Thread.java:724) ~[na:1.7.0_25]
Hi,
A really weird error.
The cells parameter in the findNumRowsToPaint-method is fetched with the getVisibleCells-method. This method has a null check which calls refreshRenderedCells() if the pageBuffer is null. The only way I can see that one leaving the pageBuffer set as null is if either one of the if statements in the beginning of the refreshRenderedCells() are executed, and the method returns without setting the pageBuffer. If it gets past those, there’s no way for pageBuffer to be null. Unfortunately I can’t really see why either of those if statements would be executed since the method is effectively called from the paint phase.
Do you know if there was anything special in the use case where this happened?
Dear Teppi,
I am using your add-on to extend it with some other capabilities, however I came accross this issue (I’m not sure if it is an issue). This code will override the values set for the column (this case “firstName”).
FilterTable table = new FilterTable();
table.setFilterBarVisible(true);
table.setFilterFieldVisible("firstName", false);
table.setVisibleColumns("firstName","lastName");
By the way, the add-on is awesome ![]()
There is a problem in the newest version 0.9.3.v7.
When you set a filter from a ENUM-field from the dropdown the table is filtered correctly. When you choose from the same-field the “empty Entry” from the dropdown, the following error occurs:
com.vaadin.event.ListenerMethod$MethodException: Invocation of method valueChange in org.tepi.filtertable.FilterFieldGenerator$2 failed.
at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:528)
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:969)
at com.vaadin.ui.AbstractField.fireValueChange(AbstractField.java:1126)
at com.vaadin.ui.AbstractField.setValue(AbstractField.java:542)
at com.vaadin.ui.AbstractSelect.setValue(AbstractSelect.java:702)
at com.vaadin.ui.ComboBox.changeVariables(ComboBox.java:664)
at com.vaadin.server.communication.ServerRpcHandler.changeVariables(ServerRpcHandler.java:396)
at com.vaadin.server.communication.ServerRpcHandler.handleBurst(ServerRpcHandler.java:221)
at com.vaadin.server.communication.ServerRpcHandler.handleRpc(ServerRpcHandler.java:111)
at com.vaadin.server.communication.UidlRequestHandler.synchronizedHandleRequest(UidlRequestHandler.java:91)
at com.vaadin.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:37)
at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1382)
at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:238)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at at.sca.proort.web.filter.UserKennungFilter.doFilterInternal(UserKennungFilter.java:141)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:369)
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:381)
at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:97)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:381)
at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:100)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:381)
at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:78)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:381)
at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:381)
at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:35)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:381)
at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:177)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:381)
at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:381)
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:168)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.__invoke(StandardContextValve.java:123)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at org.apache.catalina.core.StandardHostValve.__invoke(StandardHostValve.java:171)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
Caused by: java.lang.NullPointerException
at com.vaadin.data.util.filter.Compare.equals(Compare.java:312)
at org.tepi.filtertable.FilterFieldGenerator$2.valueChange(FilterFieldGenerator.java:471)
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)
Hi,
there’s nothing specific in FilteringTable for the row styling. You can use the same methods as for the normal Table component. Please see
https://vaadin.com/book/-/page/components.table.html
for the styling instructions (near the end of the page).
I have the same problem, which also occurs with the demo’s PagedFilterTable when selecting “Show all” from the ‘Validated’ (boolean) filter.
Hi,
FilteringTable 0.9.4.v7 has been released. This release includes the following fixes:
- Call to setVisibleColumns no longer resets the filters and their properties
- Row indexes for Paged are now counted from the total size
- Removed reindeer-specific style selector (textfields)
- Fixed ClassCastException related to DnD
- Fixed Paged current page formatting issue
- Added locatization for Paged controls
- Fixed exception on clicking Clear in the filter popups
Please ask if you have any questions, thank you!
-tepi
Hey,
After update of Vaadin to .10 and FilteringTable to .9.4v7 I don’t see filters anymore (there are blank spaces instead of them). I’ve recompiled widgetsets twice, but no luck. What else should I do/check?
Hi Team,
Table loaded slowly and getting below javascript errors in the browser lot of times while enabling the Filter option.If i disable the filter bar then table loading done quickly.But I need Filtering. Around 1000 records displaying in the table.
in the broswer error console:several times like 2500 times this error message displayed
com.vaadin.client.VConsole SEVERE: FilterTableConnector (4) has been layouted 23 times
Table streches more than the allocated space. and slowly it is trying to fit in the allocated space.
Can any one help me what’s the wrong in my code.
final PagedFilterTable table = new PagedFilterTable();
table.setWidth(“99.99%”);
IndexedContainer cont = new IndexedContainer();
cont.addContainerProperty(“Show”, CheckBox.class, null);
cont.addContainerProperty(“Shipper”, String.class, null);
cont.addContainerProperty(“Shipment Id”, String.class, null);
cont.addContainerProperty(“Bill Of Lading”,
String.class, null);
cont.addContainerProperty(“Mode”, Mode.class, null);
cont.addContainerProperty(“Origin”, String.class, null);
cont.addContainerProperty(“Destination”, String.class, null);
cont.addContainerProperty(“Departure Date”, Date.class, null);
cont.addContainerProperty(“Scheduled Arrival Date”, Date.class,
null);
for (final Object eachShipment : shipmentsList) {
cont.addItem(id);
CheckBox checkbox = new CheckBox();
cont.getContainerProperty(id, "Show").setValue(checkbox);
cont.getContainerProperty(id, "Shipper").setValue(
(String) ((Object[]) eachShipment)[0]
);
cont.getContainerProperty(id, “Shipment Id”).setValue(
(String) ((Object) eachShipment)[1]
);
cont.getContainerProperty(id, “Bill Of Lading”)
.setValue((String) ((Object) eachShipment)[2]
);
cont.getContainerProperty(id, “Mode”).setValue(Mode.Ground);
originsb = new StringBuilder(
(String) ((Object) eachShipment)[3]
);
originsb.append(“,”)
.append((String) ((Object) eachShipment)[4]
)
.append(“,”)
.append(((String) ((Object) eachShipment)[5]
)
.equalsIgnoreCase(“UNITED STATES”) ? “USA”
: (String) ((Object) eachShipment)[5]
);
cont.getContainerProperty(id, “Origin”).setValue(
originsb.toString());
destinationsb = new StringBuilder(
(String) ((Object) eachShipment)[6]
);
destinationsb
.append(“,”)
.append((String) ((Object) eachShipment)[7]
)
.append(“,”)
.append(((String) ((Object) eachShipment)[8]
)
.equalsIgnoreCase(“UNITED STATES”) ? “USA”
: (String) ((Object) eachShipment)[5]
);
cont.getContainerProperty(id, “Destination”).setValue(
destinationsb.toString());
cont.getContainerProperty(id, "Departure Date").setValue((Date) ((Object[]) eachShipment)[9]
);
cont.getContainerProperty(id, "Scheduled Arrival Date")
.setValue((Date) ((Object[]) eachShipment)[10]
);
id++;
}
table.setFilterBarVisible(true);
table.setColumnCollapsingAllowed(true);
table.setFilterGenerator(new TrackFilterGenerator());
table.setFilterDecorator(new TrackFilterDecorator());
table.setContainerDataSource(cont);
table.setImmediate(true);
table.setFooterVisible(false);
HorizontalLayout controls = table.createControls();
controls.setSizeFull();
table.setPageLength(5);
HorizontalLayout buttonLayout = new HorizontalLayout();
buttonLayout.setSizeFull();
buttonLayout.setSpacing(true);
buttonLayout.addComponent(controls);
hlayout.addComponent(table);
Hello,
I want to filter column with checkboxes (attached Untitled.png).
I’ve found and followed your guides Teppo but I’ve had problem with writing a right Filter (one returned by FiterGenerator.generateFilter() method). If I check the Checkbox with such configuration It’ll do nothing.
public class CommuniqueFilterGenerator implements FilterGenerator {
@Override
public Container.Filter generateFilter(Object o, Object o2) {
if ("Status".equals(o)) {
if (o2 != null && o2 instanceof Boolean) {
return new Compare.Equal(o, Boolean.parseBoolean((String) o2)); //what to return??
}
}

Hi,
this combination seems to work fine for me (using the demo application from FilteringTable package). Could you provide some code which reproduces the issue?
Hi,
using Ivy and the new releas 9.4.7 i get an IvyDE resolve error.
java.text.ParseException: inconsistent module descriptor file found in ‘http://maven.vaadin.com/vaadin-addons/org/vaadin/addons/filteringtable/0.9.4.v7/filteringtable-0.9.4.v7.pom’: bad revision: expected=‘0.9.4.v7’ found=‘0.9.3.v7’;
I think the problem is, that in the .pom file under http://maven.vaadin.com/vaadin-addons/org/vaadin/addons/filteringtable/0.9.4.v7/filteringtable-0.9.4.v7.pom the version tag is 0.9.3.v7 and should be 0.9.4.v7
Hello,
I upgraded to filtering table 0.9.4.v7 today and a filter field for nested table properties doesn’t appear. I have downgraded back to 0.9.3.v7 to be sure I didn’t make any other changes, but filtering on nested properties works fine in previous versions.
I use Vaadin 7.1.10 and last version of JPA Container.
Could you check it or give me a hint where to explore more details please?