I have a problem with DialogComponentColumnNameSelection in the node dialog. I have an optional port, and when the input port is not connected, the dialog won't start with an error message: "need input table spec to configure dialog".
I already tried to check, whether the port is connected or not, see the following code snippet:
and then remove the override of checkConfigurabilityBeforeLoad (or set it to return 'true' - not sure which in this case) then that should do what you want.
thanks for this proposal, but unfortunately the same problem.
I think, there are 2 sub-problems here.
I'm not quite sure, if it is really sufficient to disable the SettingsModel in order to disable the dialog component. I double-checked, and the dialog opens when I comment out the creation of the component. When only disabling the SettingsModel directly in the constructor, also the dialog won't open with the same message, see code snippet below.
But the documentation advises to do so, as disabling the component itself is deprecated.
I would guess that the execution order of the implicitly called methods like loadAdditionalSettingsFrom() or checkConfigurabilityBeforeLoad() is important here - and whether they get called at all.
Could you reproduce this? Is this a known issue or some general misunderstanding on my side of the team play between dialog components and setting models?
The first one (isrequired) you need to set to false. And the second one (addnonecol) I would propose to set to true. Than the node doesn't require a column exists and it can select none as this column in case it doesn't exist.
Does this help? I would need to double check with our developers, as I am not 100% sure myself. As far as I understood, the NodeDialog does not know this port is optional, only the NodeModel knows this.
yes indeed, this really helps! I would say, double hit!
First, it was an issue of wrong expectations on my side. In fact, I expected that the dialog knows, that the port is optional.
Second, I have to apologize that I did not see these two constructor arguments "isRequired" and "addNoneCol". Now the dialog opens without a problem, when having set isRequired to false.
To make it perfect I would like to disable the component in case that the port is not connected, but now as I managed to let the dialog open with your help, all the rest is only cosmetics.