Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Talend Component kit, Issues with @ActiveIf(s).

Hi

The @ActiveIf annotation in Talend component kit,  is not working if the target value is from a string  or a value selected from a drop down list.  say i have the following 

 

String test="somevalue";

@ActiveIf(target="test", value="{somevalue}")
String testUse;

 

testUse will still show up in the UI, the same behaviour occurs  if test is a drop list created either with enums or  @Proposable.  This will however works well in the basic-settings if test were a boolean, and a bit buggy in the advanced settings also if test is a boolean. Are these some known issues or am i doing something wrong here. thanks and

best regards 

Samba

 

Labels (2)
7 Replies
Anonymous
Not applicable
Author

Hello,
it seems you have an error in your above example if not a typo error. the { need to be outside the " ", as you can define a list of values.
Here is how it should be :

@Option
String test="somevalue";
@Option @ActiveIf(target="test", value={"somevalue"}) String testUse;

If not a typo issue, please share the full configuration class so that i can help you with it.

Anonymous
Not applicable
Author

Hello,

its not a configuration issue, here is my full configuration

in service class i have the following.

@DynamicValues("RESET_LIST")
public Values getRESETLIST() {
return new Values(Arrays.asList(new Values.Item("FIRST", "FIRST"), new Values.Item("SECOND", "SECOND"), new Values.Item("CUSTOM", "CUSTOM")));
}

 And in the Configuration class i have the following

@Option
@Documentation("")
@Proposable("RESET_LIST")
private String RESET = "CUSTOM";

 

@Option
@Documentation("")
@ActiveIf(target = "RESET", value = {"CUSTOM"})
private String target;

this configuration is not working, even if  RESET  above is not a list, is there something i m doing wrong here?  thanks and

best regards.

 

Anonymous
Not applicable
Author

Your configuration is OK. what is your studio version ?
Also do you have any errors related to that in the studio logs. you can find them in workspace/.metadata/ 

Anonymous
Not applicable
Author

Hi Anas,

my  studio version is 7.0.1,

and there are no errors in the log file. the only success i have with @Activeif  is when using booleans.

 

 

best regards

 

Anonymous
Not applicable
Author

ok i will check that in this version.

Is it an option for you, the upgrade of the studio version ?
We strongly advice the use of the latest version of the studio to develop with the framework. as the project is moving fast.
you can get the latest release from https://sourceforge.net/projects/talend-studio/files/Talend%20Open%20Studio/

And you can also consult the framework change log from here https://talend.github.io/component-runtime/main/1.1.2/changelog.html
You will find the latest bugs fixes and the new features list.

 

Anonymous
Not applicable
Author

The support of @ActiveIf for @Proposable was added in the version 1.1.0 of the framework. This version is shifted with the studio 7.1.1

Anonymous
Not applicable
Author

thank you Anas, then i will surely try to upgrade and test.

 

best regards