Details
Description
TCK let us create extensions.
In extension, we can update repository model that is very useful.
But there is a lake : the extension can update the model, but it can't influence the values set in the configuration class at runtime.
For instance, let's take an option:
@Option @Required @Documentation("Data base type from the supported data base list.") @Proposable(ACTION_LIST_SUPPORTED_DB) private String dbType;
With extension, I'm able to dynamically transform it to:
@Option @Required @Documentation("Data base type from the supported data base list.") @Default("Mysql") private String dbType;
So in form, the user will see a text field with a default value.
But what is f I want to not display this field and enforce its value to "Mysql" ?
I can try with an @activeIf
@Option @Required @Documentation("Data base type from the supported data base list.") @Default("Mysql") @ActiveIf(target = ".", value = "_IMPROBABLE_VALUE_TO_HIDE_THIS_FIELD_") private String dbType;
The field is hidden, but, the @Default is taken into account only if the field is visible.
So the dbType attribute will always be null at runtime.
Want I would want to do is :
@Option @Required @Documentation("Data base type from the supported data base list.") @Default("Mysql") @Hidden private String dbType;
And the integration would set the @default value in the field even if it is hidden.
With this, extension can automagically complete configuration, which would be great.
[EDIT]
Could be also very useful in some other cases like this one : https://jira.talendforge.org/browse/TDI-46122
We want an explicitly hidden field and the only current way is the workaround, which consists of define an always false @ActiveIf
Attachments
Issue Links
- is related to
-
TCOMP-2026 Support configure dataset properties to be hidden in input or output
- New