Reputation: 949
I need to filter a Grid column based on multiple values? In other words, they choose 3 values from a dropdown, "Apple", "Orange", and "Meat". Then the filter chooses all matching grid lines that have Apple OR Orange or Meat in them. Would com.vaadin.data.util.filter.Or
be good for this? Any examples on how to use it?
Upvotes: 1
Views: 97
Reputation: 8001
Sounds like something along these lines:
theContainerUsedByTheGrid.addContainerFilter(new Or(
new Compare.Equal("propertyId", "Apple"),
new Compare.Equal("propertyId", "Orange"),
new Compare.Equal("propertyId", "Meat")));
Upvotes: 3