Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I want to create a list in my configuration of my component. My List look like:
@Option("providedInformation") @Documentation("providedInformation") private List<ProvInfo> providedInformation = new ArrayList<>();
public class ProvInfo {
@Documentation("name")
@Option("name")
private String name;
@Documentation("url")
@Option("url")
private Url url;
....
In my configuration field there is a list, butI can not edit:
I use version 1.1.1, in a earlier version it works.
I can click the plus Button, but I can not write into the fields.
Hello,
You are missing the layout for your ProvInfo class that define your table. This is why you are getting a table with no columns and so not editable.
Please add layout to your class.
A simple one can be
@OptionsOrder({ "name", "url" })
Hope it helps.
Hi Anas,
in my case its not working it only works in the basic settings, but in the previous versions it worked both in basic and advanced settings maybe this is a bug to look into?
best regards.
I have tried the suggested solution on the studio TOS_DI-20181026_1147-V7.1.1 and framework version 1.1.1 and it works.
@mbocquet on which version are you having the issue exactly ?
Hi Anas,
i m using it on version 1.1.1 of the framework and TOS 7.1.1, an it only works in the basic settings. this is the version of the framework i m using
<dependency> <groupId>org.talend.sdk.component</groupId> <artifactId>component-api</artifactId> <version>1.1.1</version> <scope>provided</scope> </dependency>
When defining advanced settings properties. layout is also required. and in this version only configuration that belong to advanced settings will shows in advanced tab including for tables.
To get it works you will need to defined the columns of your table in the advanced settings layout.
@GridLayout(names = ADVANCED, value = { @GridLayout.Row("providedInformation"), @GridLayout.Row("myURL") }) public class MyConfig implements Serializable { @Option("providedInformation") private List<ProvInfo> providedInformation = new ArrayList<>(); @GridLayout(names = ADVANCED, value = { @GridLayout.Row({ "name", "url" }) }) public static class ProvInfo { @Option("name") private String name; @Option("url") private URL url; } }