I'm attempting to setup a simple static filter on a list, with the existing DataLayer implementation as
rowDataLayer = new SpanningDataLayer(getRowDataProvider()); // getRowDataProvider() returns ISpanningDataProvider
Could someone point me in the right direction please? After looking through the examples, I've come up with the following replacement, although I'm getting null pointer exceptions - I'm probably misunderstanding something simple.
//create a new ConfigRegistry which will be needed for GlazedLists handling
ConfigRegistry configRegistry = new ConfigRegistry();
CompositeMatcherEditor<String> autoFilterMatcherEditor = new CompositeMatcherEditor<String>();
DefaultGlazedListsStaticFilterStrategy<String> filterStrategy = new DefaultGlazedListsStaticFilterStrategy<String>(autoFilterMatcherEditor, null, configRegistry);
filterStrategy.addStaticFilter(new Matcher<String>() {
@Override
public boolean matches(String item) {
return true; // for testing - match everything for now
}
});
rowDataLayer = new FilterRowDataLayer<String>(filterStrategy, rowDataLayer, getRowDataProvider(), configRegistry);