Package com.vaadin.flow.data.binder
Interface ValidationStatusChangeListener<V>
-
- All Superinterfaces:
Serializable
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface ValidationStatusChangeListener<V> extends Serializable
The listener interface for receivingValidationStatusChangeEventevents. The classes that are interested in processing validation status changed events of field components should register implementation of this interface viaHasValidator.addValidationStatusChangeListener(ValidationStatusChangeListener)which are called whenever such event is fired by the component.This interface is primarily introduced to enable binding instances subscribe for their own associated field's validation status change events and revalidate after that. However, when all the components implementing
HasValidatorinterface, implement the correct behaviour for adding and notifying listeners of the current type, other usages are also become possible since theValidationStatusChangeEventpayload contains the sourceHasValuefield and the new validation status, thus for instance fields or buttons in a view can subscribe for each other's validation statuses and enable/disable or clear values, etc. respectively.- Since:
- 23.2
- See Also:
HasValidator,Binder.BindingBuilderImpl.bind(ValueProvider, Setter)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidvalidationStatusChanged(ValidationStatusChangeEvent<V> event)Invoked when a ValidationStatusChangeEvent occurs.
-
-
-
Method Detail
-
validationStatusChanged
void validationStatusChanged(ValidationStatusChangeEvent<V> event)
Invoked when a ValidationStatusChangeEvent occurs.- Parameters:
event- the event to be processed
-
-