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.
The listener interface for receiving
ValidationStatusChangeEvent
events. The classes that are interested in processing validation status
changed events of field components should register implementation of this
interface via
HasValidator.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 the ValidationStatusChangeEvent
payload contains the
source HasValue
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:
- 23.2
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Invoked when a ValidationStatusChangeEvent occurs.
-
Method Details
-
validationStatusChanged
Invoked when a ValidationStatusChangeEvent occurs.- Parameters:
event
- the event to be processed
-