Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Everyone,
I just faced an issue with the @ActiveIf annotation in Talend Open Studio 7.1.1.
@Option @Required @Suggestable(parameters = "_inputDataStore", value = "fetchResources") private String _endpoint; @Option @ActiveIf(target = "_endpoint", value = "groupId", evaluationStrategy = ActiveIf.EvaluationStrategy.CONTAINS) private String _siteId;
When the evaluationStrategy is set to EvaluationStrategy.CONTAINS, the field on Component UI is not activated, however the "_endpoint" does contain the word of "groupId". 😕
When I use the default strategy and check for the whole String which is chosen by the user for the "_endpoint", it works.
According to the JavaDoc of EvaluationStrategy.CONTAINS it should check against the sub-string from the value param: "Check if a string or list of string contains a value."
My impression was that it should activate the "_siteId" field if the "_endpoint" contains "groupId". Shouldn't it?
Thanks,
Zoltán
Hi @devxr
If you test with talent-component:web it works well but it does not in the studio as you described. this is due to the fact you used a suggestion on the endpoint field - if you remove the suggestion it works.
A workaround can be to use an enum if you endpoints are fixed or an update button if it works for you. Indeed I dont propose you to use a plain input without completion because I assume it does not match what you want.
Hi @devxr
If you test with talent-component:web it works well but it does not in the studio as you described. this is due to the fact you used a suggestion on the endpoint field - if you remove the suggestion it works.
A workaround can be to use an enum if you endpoints are fixed or an update button if it works for you. Indeed I dont propose you to use a plain input without completion because I assume it does not match what you want.
Thanks @rmannibucau for the answer. I can confirm that it works well in the web tool. For the meantime, I think I'll just rely on using simple input fields.
If it can be fixed in the upcoming Studio release that would be awesome.