Filter Constructor/Member Visibilty

In the process of creating a slightly more generic version of BeanItemContainer, I noticed that there are a couple of references to the member Filter.propertyId.

Unfortunately Filter.propertyId and constructor has package visibility, so this cannot be obtained. A public getter might be good so that container implementations can copy the behavior of:


private Item addItemAtInternalIndex(int index, Object newItemId) and
public void addContainerFilter(Object propertyId, String filterString, boolean ignoreCase, boolean onlyMatchPrefix);

Incidentally, the container that I have implemented is quite useful. There is:

  • an abstract container with extensible adapters (the reflection mechanism of BeanItemContainer might be one implementation)
  • an abstract EL implementation that allows EL expressions to be specified in order to extract properties from objects
  • a concrete EL implementation using Spring’s EL
  • a concrete implementation using XPath

This flexibility takes care of 99% of all possible requirements that I have for Containers. Implementing Vaadin containers very error-prone with lots of edge cases (item not found, property not found, etc.), something that I’m guessing would end in tears for 80% of potential users.

I would humbly suggest that something like this be considered for inclusion in the core product.

I’ll post a link to code shortly.

I completely agree with Rob. I’m a Vaadin enthusiast but I must say the Filter/BeanItemContainer was not built for extension.

For example, I must use a Filter that ignores accents (I’m European). I must hack like crazy or copy-paste just to implement a feature that is very useful on our continent (not to mention others).

Please add the feature!

Another vote for this. I’d like to see a simple addFilter( Filter ) for Containers. The BeanItemContainer.addContainerFilter(propertyId, term, ignoreCase, onlyMatchPrefix) is very restrictive.

Hi Nicolas,

I would appreciate this feature too.
Maybe it also a good idea to add a feature request ticket to the trac.


Vaadin trac