Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Talend Team,
I am having a problem when using the listOfValue context type in creating a context value. It seems it does not work. I have an array list of values that I want to store inside one context value. So I created a context value and set the Type to "listOfValue" and inputted my set of values as shown below:
Then as I tried to execute a test job using a tJava and print them(using a simple System.out.println)to see if I can get a random list of values out of the context. This is what happened:
So it will only list the FIRST value that I set. I am not sure what is causing this, and apparently Im not the only one experiencing this because I think I have seen this in the old talend forum site(talendForge) which by God knows what does not seem to open(Is the site officially dead?).
Anyways, any help would be gladly appreciated.
Regards,
-Locke
Please provide your code in tjava component
4 years later and I'm also facing this issue on TOS 7.2...
@Shicong Hong , @not specified not specified , @not specified not specified , can someone please confirm this?
I have a List that shows on the context parameters as <1,2,3>
and on tjava component I use
System.out.println("child #: "+context.array_run_subchild+ "; typeof = "+context.array_run_subchild.getClass());
and it prints only the 1st element ... I believe this was supposed to be an array, right?
Can you pls confirm if this is still a bug or are we all misunderstanding the feature? Because the documentation is not helpful enough for this kind of datatype.
@Ana Tavares
you misunderstand the list of values type, List of values in context is used only to select context value before running job (when checking context checkbox).
you cannot access list during job running. only the selected one.
if you don't check checkbox you are using the fist data of the list.
Sorry, which checkbox? I don't understand. Can you kindly share a print or something, about this? Thank you.