Dynamic list in dropdown

Four Stars

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
Community Manager

Re: Dynamic list in dropdown

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
----------------------------------------------------------
Talend | Data Agility for Modern Business

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Why Companies Move to the Cloud: 7 Success Stories

Learn how and why companies are moving to the Cloud

Read Now