I am currently working with filters on a power table and found a script that works for a single value, but I have not found a way to use jidesoft MultipleValuesFilter in it’s place; I also haven’t been able to find any good documentation or examples of this.
def setFilter(self, filters):
model = self.getTable().getModel().getActualModel()
from com.jidesoft.grid import MultipleValuesFilter
for f in filters: class newFilter(MultipleValuesFilter): def isValueFiltered(self, value): return bool( value != f ) model.addFilter(0, newFilter()) model.setFiltersApplied(True) model.refresh()
This is what I have attempted to put together so far, using the script that I already was using for singlevaluefilter. I pass through an array as the parameter “filters” in a propertyChanged event script, but it creates a new filter that overwrites the last one for each element of the array/list rather than adding it together. I’m not quite sure where to go from here, so any help would be appreciated!