How to keep attributes in exclude-list by default when using DialogComponentColumnNameSelection?

Hi,

I would like to know whether it it is somehow possible to keep all attributes in the exclude list when using the DialogComponentColumnNameSelection? By default all attributes are selected, but this is undesirable for instance if the node will perform expensive calculations on each selected attribute. As users are lazy they will often forget to trim the list to the actual attributes of interest.

Currently I’m instantiating the selector as follows:
new DialogComponentColumnFilter(createPropFactorSelection(), 0, false, new Class[]{StringValue.class, IntValue.class}

I’ve looked through the API but could not find any flag that would fix my problem.

Any help would be greatly appreciated.

Best, Watzlaw

Hi Watzlaw,
Sorry, there is currently no way to tell the component to in- or exclude columns per default. BUT, the underlying ColumnFilterPanel allow setting this property during the #update() call. However, this requires some more work on the programmers side, since you need to implement load and save settings by yourself.
Regards, Thomas

Hi Thomas,

thanks to for the hint. By going the methods you’ve pointed me to, I’ve noticed that the folloing solution also works:

@Override in subclass of DefaultNodeSettingsPane public void loadAdditionalSettingsFrom(NodeSettingsRO settings, DataTableSpec[] specs) throws NotConfigurableException { super.loadAdditionalSettingsFrom(settings, specs); List excludeList = AttributeUtils.toStringList(AttributeUtils.convert(specs[0])); excludeList.removeAll(overlayFilterString.getIncludeList()); overlayFilterString.setExcludeList(excludeList); }

Even if I’ve not attached my small utility class the approach should be clear. It works for me. The advantage compared to your suggested solution is that I don’t have to override DialogComponentColumnFilter.updateComponent() which you might change in future versions of Knime.

Best, Watzlaw