Java Snippet ComboBox Not Working

Hello - I am trying to create a simple java snippet for a combo box which the values for the drop down box are filled from a table creator node. The warning I get is that the variable Option cannot be resolved to be a variable. Any help would be appreciated. before you ask why it needs to be a combo box – we do not want user to have to select item w/in node each time this runs. Requirements are to have window where user can select item from drop down menu and proceed with flow.


Hey @love_hate_knime,

So I was looking into the issue you mention, and a couple of things stood out.

For the column, I would just double click the left pane on β€˜Options’ as it will give you the syntax for selecting it. Also, I think a limiting factor may be because it is not in a list and .length is normally called on an array and after I tried it out myself, the .length gives an error while .length() does not. So, that suggests to me it is expecting a string and not a list of options such as how you want it.

I would try converting that table you have to a list and then passing that in to the Java Snippet.

This should also allow the use of indexing to fetch values such as Options[i]

Hope this helps,
TL

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.