Disabling Text Field in install4j

26 views Asked by At

enter image description here

Hi colleagues! My installer has following screen. I need enable 'HTTP' and 'HTTPS' fields only if 'Need proxy configuration was selected' otherwise they should be disabled. I prepared some code fragment:

if (!context.getBooleanVariable("isProxyNeed")) {
    context.getInstallationComponentById("httpInput").setEnabled(false);
}

But I don't understand when can I it use ?

1

There are 1 answers

4
Ingo Kegel On

For that use case, do not use the "Radio button group" form component, but two instances of the "Single radio button" form component.

The "Single radio button" form component has a "Coupled Form Components" configuration where you can select the form components that should only be enabled when the radio button is selected.

enter image description here