Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Dynamic list in dropdown

Hi
I like this: https://help.talend.com/pages/viewpage.action?pageId=22523042
But, how to create a dynamic list for tJava coming from a PostgreSQL query instead of hardcoded list?
Martin F
Labels (3)
1 Reply
Anonymous
Not applicable
Author

Hi Martin
Thanks for your comment, I will modify the article to add another use case that the items coming from a data source and create a dynamic list. Here I show you how to do that, use a tJavaFlex instead of tJava, we will store the items coming from a data source to a list one by one in the main part of the component, and create the list at the end part of component. For details, please see my screenshots.
Code on the end part of tJavaFlex:
String [] nameList=new String;
nameList=list.toArray(nameList);
JFrame frame = new JFrame("Input Dialog Example");
String returnValue = (String) JOptionPane.showInputDialog(frame,
"Select the name you want to query?","Employee Information",JOptionPane.QUESTION_MESSAGE,null,nameList,nameList);

Shong