Depending on the value of one component I need to show / not show the required indicator of another component.
I’ve tried it via my validator group - only for the first time when displaying the layout it works - afterwards no effect any more. Finally I tried it by
comp1.addValueChangeListener(new ValueChangeListener<MyType>() {
@Override
public void valueChange(ValueChangeEvent<MyType> event) {
if (event.getValue().isSpecialState()) {
comp2.setRequiredIndicatorVisible(false);
} else {
comp2.setRequiredIndicatorVisible(true);
}
}
});
Also no effect. How to dynamically change the required indicator?
Some additional information: The actual dynamic validation (that a value for the component is required or not) I’m doing not via BindingBuilder.asRequired but via a custom validator in a validator group, that also validates a lot of other things.