I asked a question about selecting a value from a selected column. Thank you very much for your kind answer. I am sorry that I don’t understand all the information because I am a beginner.
I added the 3 procedures that you taught me:
- store a reference to the input table spec:
knime-base/LogRegLearnerNodeDialogPane.java at master · knime/knime-base · GitHub 7
- Implement the code to update the selection model based on the domain data:
knime-base/LogRegLearnerNodeDialogPane.java at master · knime/knime-base · GitHub 5
- Don’t forget to add an EventListener to your column selection widget:
knime-base/LogRegLearnerNodeDialogPane.java at master · knime/knime-base · GitHub 1
However, the dialog disappears after I add them. I guess the reason is that something wrong with JComboBox m_targetReferenceCategory. Chould you please help me find the problem?
My code shows in the future below:
I am trying to select a ‘label column’ and then select a specified value from the column.
Thank you very much!
What do you mean by that? Is an exception thrown ? Is the dialog window closed or how does it disappear?
The dialog can’t be opened anymore. I can open it by double click or right click → configure before I add the code.
And the errors like this:
Looks like you are trying to access an uninitialized variable in line 86. If you configure your eclipse to use a Java 17 VM to start your AP (supported from AP 4.6) it will tell you exactly what variable is causing this error. From the screenshots you sent, it looks like the
m_selectionPanel is null during initialization.
Hi, thanks for your reply.
Now I am trying to solve m_selectionPanel and meet this error. I switch Java 11 to 17 now but I didn’t see more support and I didn’t find what is ‘my AP’. How can I handle this?
I am trying to look through ColumnSelectionPanel. It looks like this.
Thank you very much.
With AP I mean KNIME Analytics Platform, the tool you are developing your extensions for.
Rergarding your error, there is a NominalValue interface and a class, make sure you imported the interface and not the class, as that one won’t work.
I have opened the dialog after importing the interface! Thanks!
Now the new dialog looks like making some space for the drop-down list but doesn’t show the reference category.
I haven’t add these codes:
I know how to solve column selection:
trainingColumnSettings = VennAbersNodeModel.createTrainingColumnSettings();
testColumnSettings = VennAbersNodeModel.createTestColumnSettings();
addDialogComponent(new DialogComponentColumnNameSelection(testColumnSettings, "Test object column for Y=1:", tableIndex,
addDialogComponent(new DialogComponentColumnNameSelection(trainingColumnSettings, "Training object column for Y=1:", tableIndex,
Can I do similar things in nodemodel for getTargetReferenceCategory(), getUseTargetDomainOrder() and getUseFeatureDomainOrder()?
To get a value out of the node settings, you need to use a settings model initialized with the same key. Then you can use
m_settingsModel.load() on the settings object.