Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Talend component kit, how to conditionally display Widgets

Hi every one,

is there any way to conditionally display checkboxes, inputfields , text etc etc in the new Talend component kit? in xml one could use show_if...

 

 

best regards

Samba

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hello,
The annotation @ActiveIf is designed for this purpose.
Here is a quick example :

public class MyConfiguration {

 @Option
 private boolean requiredAuthentication;

 //you can show a username and password according to the value of requiredAuthentication
 @Option
 @ActivetIf( target = "requiredAuthentication", value = {"true"} )
 private String username;

 @Option
 @ActivetIf( target = "requiredAuthentication", value = {"true"} )
 @Credential
 private String password;

}


check the API javadoc for more details https://talend.github.io/component-runtime/apidocs/1.0.5/api/index.html

 

View solution in original post

7 Replies
Anonymous
Not applicable
Author

Hello,
The annotation @ActiveIf is designed for this purpose.
Here is a quick example :

public class MyConfiguration {

 @Option
 private boolean requiredAuthentication;

 //you can show a username and password according to the value of requiredAuthentication
 @Option
 @ActivetIf( target = "requiredAuthentication", value = {"true"} )
 private String username;

 @Option
 @ActivetIf( target = "requiredAuthentication", value = {"true"} )
 @Credential
 private String password;

}


check the API javadoc for more details https://talend.github.io/component-runtime/apidocs/1.0.5/api/index.html

 

Anonymous
Not applicable
Author

Hi anas,

Thanks for your reply, but the solution is a bit buggy . i added the annotations 100% like what you added but then to see the changes i will need to switch views i.e something is not refreshing in real time, is there any solution to this behavior? 

 

Best regards

samba

Anonymous
Not applicable
Author

which version of the studio are you using to test ?

Anonymous
Not applicable
Author

I m using  Studio version 7.0.1

best regards

Anonymous
Not applicable
Author

I suggest you to test with a newer version of the studio. 
You can download the latest released version from here  Talend Open Studio

Anonymous
Not applicable
Author

Hi i m not using open studio,  i m using Talend studio 7.0.1,  we are tying to see if a component that was created with javajet can be implemented in component kit, The company will surely not be updating the version(7.0.1) of Talend we are using very soon, so it seems there is no workaround in our version ?

 

best regards 

Talend

Anonymous
Not applicable
Author

In this case, i strongly suggest you to open a bug in the project bugtracker so that the team can provide you the necessary support for your specific version.