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 receivingValidationStatusChangeEvent
events. 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
HasValidator
interface, implement the correct behaviour for adding and notifying listeners of the current type, other usages are also become possible since theValidationStatusChangeEvent
payload contains the sourceHasValue
field 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:
- 2.7
- See Also:
HasValidator
,Binder.BindingBuilderImpl.bind(ValueProvider, Setter)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
validationStatusChanged(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
-
-